../
kernel
functions
add
all
apply_delta
assert
atan2
btn
btnp
camera
cd
char
chooser
circ
circfill
clip
cls
color
cos
count
cp
create_delta
create_gui
create_process
cursor
date
del
deli
env
error
exit
fetch
fetch_metadata
fget
fillp
foreach
fset
fstat
fullpath
get_clipboard
get_display
get_draw_target
get_spr
include
input
key
keyp
line
ls
map
max
memcpy
memmap
memset
menuitem
mget
mkdir
mouse
mouselock
mset
music
mv
note
on_event
open
oval
ovalfill
peek
peek2
peek4
peek8
peektext
pget
pid
pod
poke
poke2
poke4
poke8
printh
pset
pwd
readtext
rect
rectfill
rm
rrect
rrectfill
scoresub
send_message
set_clipboard
set_draw_target
set_spr
sfx
sin
socket
split
spr
sspr
stat
stop
store
store_metadata
sub
time
tokenoid
type
unmap
unpod
userdata
vec
vid
window
add(table,value,[index])
Overview
add adds a value to the end of the table or at [index].
Without an index, it is equivalent to:
tbl[#tbl + 1] = val
Arguments
table: table
The table you would like to add value to.
value: any
The value to add into the table table
[index]: integer
The index of where to place the item in the table table, defaults to the end of the table.
Examples
Sourced from the Picotron Manual
foo={}-- create empty table
add(foo, 11)
add(foo, 22)
?foo[2] -- 22