Categories

Program flow

if if cond .. [elseif cond ..] [else ..] endif
elseif
else
endif
select select var .. [case val_1[, .. val_n] ..] [default ..] endsel
case
default
endsel
do do .. loop / do .. until cond
loop do ... loop
until do ... until cond
while while cond .. wend
wend
for for var = start_value to end_value .. next
foreach foreach [key, ] value in tbl .. next
break break
function function name([prm_1[, prm_2 .. [, prm_n]]]) .. endfunc / (fnc)function([prm_1[, prm_2 .. [, prm_n]]]) .. endfunc
endfunc
return return [value]
visible visible var_1 [= val_1][, var_2 [= val_2] .. [, var_n [= val_n]]]
constant constant name_1 = val_1[, name_2 = val_2 .. [, name_n = val_n]]
include include filename
end end

Numbers and math

int (num)int(value)
float (num)float(value)
min (num)min(x, y)
max (num)max(x, y)
sgn (num)sgn(x)
abs (num)abs(x)
floor (num)floor(x)
ceil (num)ceil(x)
round (num)round(x)
sqr (num)sqr(x)
pow (num)pow(x, y)
cos (num)cos(x)
sin (num)sin(x)
tan (num)tan(x)
acos (num)acos(x)
asin (num)asin(x)
atan (num)atan(x)
atan2 (num)atan2(y, x)
rad (num)rad(x)
deg (num)deg(x)
randomize randomize seed
rnd (num)rnd() / (num)rnd(n) / (num)rnd(min_value, max_value)

Strings

str (str)str(value[, int_digits[, dec_digits]])
len (num)len(str)
chr (str)chr(ascii_code)
asc (num)asc(str)
lower (str)lower(str)
upper (str)upper(str)
left (str)left(str, pos)
right (str)right(str, pos)
mid (str)mid(str, pos[, count])
split (tbl)split(str, sub_str)
instr (num)instr(str, sub_str[, start_pos])
replace (str)replace(str, sub_str, rep_str[, start_pos])

Arrays and tables

dim (tbl)dim(size_1[, size_2 .. [, size_n]])
fill (tbl)fill(value, size_1[, size_2 .. [, size_n]])
insert insert tbl, index, value
sizeof (num)sizeof(tbl)
clear clear tbl
copy (type of v)copy(v)
key (num)key(tbl, key)
val (num)val(tbl, value)
free key free key tbl, key
free val free val tbl, value
free free var
this this

Time and date

time (num)time([year[, month[, day[, hour[, minute[, second]]]]]])
datetime (tbl)datetime([time_value])
clock (num)clock()
wait wait ms
fwait fwait fps / (num)fwait(fps)

Files

createfile (num)createfile(filename[, binary])
create file create file file_id, filename[, binary]
write file write file file_id, x[, bytes[, signed]]
wln file wln file file_id, s
openfile (num)openfile(filename[, binary])
open file open file file_id, filename[, binary]
exists (num)exists(filename)
file (num)file(file_id)
fread (str/num)fread(file_id[, bytes[, signed]])
frln (str)frln(file_id)
freadc (num)freadc(file_id)
filetell (num)filetell(file_id)
fileseek (num)fileseek(file_id, offset[, whence = SEEK_SET])
file seek file seek file_id, offset[, whence = SEEK_SET]
free file free file file_id
openfiledialog (str)openfiledialog(file_ext)
savefiledialog (str)savefiledialog(file_ext)

Window and input

set window set window title, w, h[, fullscreen[, scale]]
active (num)active()
screenw (num)screenw()
screenh (num)screenh()
window (num)window(title)
set redraw set redraw value
redraw redraw
keydown (num)keydown(key_code[, unflag])
inkey (num)inkey()
rln (str/type)rln([max_chars[, type]])
mousex (num)mousex()
mousey (num)mousey()
mousebutton (num)mousebutton(btn_index[, unflag])
set mouse set mouse visibility / set mouse x, y
joyx (num)joyx()
joyy (num)joyy()
joybutton (num)joybutton([id[, unflag]])
createzone (num)createzone(x, y, w, h)
create zone create zone zone_id, x, y, w, h
free zone free zone zone_id
zone (num)zone() / (num)zone(zone_id) / (num)zone(x, y)
zonex (num)zonex(zone_id)
zoney (num)zoney(zone_id)
zonew (num)zonew(zone_id)
zoneh (num)zoneh(zone_id)

Graphics

set color set color r, g, b[, a] / set color tbl
set colori set colori c
pixel (tbl)pixel([image_id, ]x, y)
pixeli (num)pixeli([image_id, ]x, y)
set additive set additive value
set clip rect set clip rect x, y, w, h
clear clip rect clear clip rect
cls cls [set_pixels]
draw pixel draw pixel x, y
set pixel set pixel x, y
draw line draw line x_1, y_1, x_2, y_2
draw line to draw line [to] x, y
draw rect draw rect x, y, w, h[, fill]
draw ellipse draw ellipse x, y, x_radius, y_radius[, fill]
draw poly draw poly points[, fill, [point_count]]
loadimage (num)loadimage(filename[, cols, rows])
load image load image image_id, filename[, cols, rows]
createimage (num)createimage(w, h)
create image create image image_id, w, h
image (num)image(image_id)
width (num)width(image_id)
height (num)height(image_id)
save image save image image_id, filename
set image grid set image grid image_id, cols, rows
cels cels(image_id)
set image colorkey set image colorkey image_id, r, g, b
free image free image image_id
set image set image image_id
draw image draw image image_id, x, y[, cel / src_x, src_y, src_w, src_h]
draw vraster draw vraster image_id, x, y_1, y_2, u_1, v_1, u_2, v_2
draw hraster draw hraster image_id, y, x_1, x_2, u_1, v_1, u_2, v_2
draw image xform draw image xform image_id, x, y, scale_x, scale_y, angle, pivot_x, pivot_y[, cel / src_x, src_y, src_w, src_h]
draw poly image draw poly image image_id, points[, point_fields[, point_count]]
draw poly xform draw poly xform points, x, y, scale_x, scale_y, angle, pivot_x, pivot_y[, filled[, point_count]]
draw poly image xform draw poly image xform image_id, points, x, y, scale_x, scale_y, angle, pivot_x, pivot_y[, field_count[, point_count]]
createfont (num)createfont(name, size[, bold[, italic[, underline[, smooth]]]])
create font create font font_id, name, size[, bold[, italic[, underline[, smooth]]]]
loadfont (num)loadfont(filename)
load font load font font_id, filename
font (num)font(font_id)
save font save font font_id, filename
free font free font font_id
set font set font font_id
fwidth (num)fwidth([font_id, ]str)
fheight (num)fheight([font_id])
set caret set caret x, y
set justification set justification left/right/center/value
wln wln str
write write str
center center str
scroll scroll dx, dy

Music and sound

loadsound (num)loadsound(filename)
load sound load sound sound_id, filename
createsound (num)createsound(left_data, right_data, sample_rate)
create sound create sound sound_id, left_data, right_data, sample_rate
sound (num)sound(sound_id)
free sound free sound sound_id
play sound play sound sound_id[, volume[, panning]]
loadmusic (num)loadmusic(filename)
load music load music music_id, filename
music (num)music(music_id)
free music free music music_id
play music play music music_id[, loop]
stop music stop music music_id
set music volume set music volume music_id, value

Other

pln pln str
typeof (num)typeof(var)
set clipboard set clipboard str
clipboard (str)clipboard()
system system cmd / (str)system(cmd)
download (num/str/tbl)download(url, destination)
asm asm .. endasm
endasm

Alphabetical

A

abs (num)abs(x)
acos (num)acos(x)
active (num)active()
asc (num)asc(str)
asin (num)asin(x)
asm asm .. endasm
atan (num)atan(x)
atan2 (num)atan2(y, x)

B

break break

C

case select var .. [case val_1[, .. val_n] ..] [default ..] endsel
ceil (num)ceil(x)
cels cels(image_id)
center center str
chr (str)chr(ascii_code)
clear clear tbl
clear clip rect clear clip rect
clipboard (str)clipboard()
clock (num)clock()
cls cls [set_pixels]
constant constant name_1 = val_1[, name_2 = val_2 .. [, name_n = val_n]]
copy (type of v)copy(v)
cos (num)cos(x)
create file create file file_id, filename[, binary]
create font create font font_id, name, size[, bold[, italic[, underline[, smooth]]]]
create image create image image_id, w, h
create sound create sound sound_id, left_data, right_data, sample_rate
create zone create zone zone_id, x, y, w, h
createfile (num)createfile(filename[, binary])
createfont (num)createfont(name, size[, bold[, italic[, underline[, smooth]]]])
createimage (num)createimage(w, h)
createsound (num)createsound(left_data, right_data, sample_rate)
createzone (num)createzone(x, y, w, h)

D

datetime (tbl)datetime([time_value])
default select var .. [case val_1[, .. val_n] ..] [default ..] endsel
deg (num)deg(x)
dim (tbl)dim(size_1[, size_2 .. [, size_n]])
do do .. loop / do .. until cond
download (num/str/tbl)download(url, destination)
draw ellipse draw ellipse x, y, x_radius, y_radius[, fill]
draw hraster draw hraster image_id, y, x_1, x_2, u_1, v_1, u_2, v_2
draw image draw image image_id, x, y[, cel / src_x, src_y, src_w, src_h]
draw image xform draw image xform image_id, x, y, scale_x, scale_y, angle, pivot_x, pivot_y[, cel / src_x, src_y, src_w, src_h]
draw line draw line x_1, y_1, x_2, y_2
draw line to draw line [to] x, y
draw pixel draw pixel x, y
draw poly draw poly points[, fill, [point_count]]
draw poly image draw poly image image_id, points[, point_fields[, point_count]]
draw poly image xform draw poly image xform image_id, points, x, y, scale_x, scale_y, angle, pivot_x, pivot_y[, field_count[, point_count]]
draw poly xform draw poly xform points, x, y, scale_x, scale_y, angle, pivot_x, pivot_y[, filled[, point_count]]
draw rect draw rect x, y, w, h[, fill]
draw vraster draw vraster image_id, x, y_1, y_2, u_1, v_1, u_2, v_2

E

else if cond .. [elseif cond ..] [else ..] endif
elseif if cond .. [elseif cond ..] [else ..] endif
end end
endasm asm .. endasm
endfunc function name([prm_1[, prm_2 .. [, prm_n]]]) .. endfunc / (fnc)function([prm_1[, prm_2 .. [, prm_n]]]) .. endfunc
endif if cond .. [elseif cond ..] [else ..] endif
endsel select var .. [case val_1[, .. val_n] ..] [default ..] endsel
exists (num)exists(filename)

F

fheight (num)fheight([font_id])
file (num)file(file_id)
file seek file seek file_id, offset[, whence = SEEK_SET]
fileseek (num)fileseek(file_id, offset[, whence = SEEK_SET])
filetell (num)filetell(file_id)
fill (tbl)fill(value, size_1[, size_2 .. [, size_n]])
float (num)float(value)
floor (num)floor(x)
font (num)font(font_id)
for for var = start_value to end_value .. next
foreach foreach [key, ] value in tbl .. next
fread (str/num)fread(file_id[, bytes[, signed]])
freadc (num)freadc(file_id)
free free var
free file free file file_id
free font free font font_id
free image free image image_id
free key free key tbl, key
free music free music music_id
free sound free sound sound_id
free val free val tbl, value
free zone free zone zone_id
frln (str)frln(file_id)
function function name(prm_1[, prm_2 .. [, prm_n]]) .. endfunc / (fnc)function(prm_1[, prm_2 .. [, prm_n]]) .. endfunc
fwait fwait fps / (num)fwait(fps)
fwidth (num)fwidth([font_id, ]str)

H

height (num)height(image_id)

I

if if cond .. [elseif cond ..] [else ..] endif
image (num)image(image_id)
include include filename
inkey (num)inkey()
insert insert tbl, index, value
instr (num)instr(str, sub_str[, start_pos])
int (num)int(value)

J

joybutton (num)joybutton([id[, unflag]])
joyx (num)joyx()
joyy (num)joyy()

K

key (num)key(tbl, key)
keydown (num)keydown(key_code[, unflag])

L

left (str)left(str, pos)
len (num)len(str)
load font load font font_id, filename
load image load image image_id, filename[, cols, rows]
load music load music music_id, filename
load sound load sound sound_id, filename
loadfont (num)loadfont(filename)
loadimage (num)loadimage(filename[, cols, rows])
loadmusic (num)loadmusic(filename)
loadsound (num)loadsound(filename)
loop do ... loop
lower (str)lower(str)

M

max (num)max(x, y)
mid (str)mid(str, pos[, count])
min (num)min(x, y)
mousebutton (num)mousebutton(btn_index[, unflag])
mousex (num)mousex()
mousey (num)mousey()
music (num)music(music_id)

O

open file open file file_id, filename[, binary]
openfile (num)openfile(filename[, binary])
openfiledialog (str)openfiledialog(file_ext)

P

pixel (tbl)pixel([image_id, ]x, y)
pixeli (num)pixeli([image_id, ]x, y)
play music play music music_id[, loop]
play sound play sound sound_id[, volume[, panning]]
pln pln str
pow (num)pow(x, y)

R

rad (num)rad(x)
randomize randomize seed
redraw redraw
replace (str)replace(str, sub_str, rep_str[, start_pos])
return return [value]
right (str)right(str, pos)
rln (str/type)rln([max_chars[, type]])
rnd (num)rnd() / (num)rnd(n) / (num)rnd(min_value, max_value)
round (num)round(x)

S

save font save font font_id, filename
save image save image image_id, filename
savefiledialog (str)savefiledialog(file_ext)
screenh (num)screenh()
screenw (num)screenw()
scroll scroll dx, dy
select select var .. [case val_1[, .. val_n] ..] [default ..] endsel
set additive set additive value
set caret set caret x, y
set clip rect set clip rect x, y, w, h
set clipboard set clipboard str
set color set color r, g, b[, a] / set color tbl
set colori set colori c
set font set font font_id
set image set image image_id
set image colorkey set image colorkey image_id, r, g, b
set image grid set image grid image_id, cols, rows
set justification set justification left/right/center/value
set mouse set mouse visibility / set mouse x, y
set music volume set music volume music_id, value
set pixel set pixel x, y
set redraw set redraw value
set window set window title, w, h[, fullscreen[, scale]]
sgn (num)sgn(x)
sin (num)sin(x)
sizeof (num)sizeof(tbl)
sound (num)sound(sound_id)
split (tbl)split(str, sub_str)
sqr (num)sqr(x)
stop music stop music music_id
str (str)str(value[, int_digits[, dec_digits]])
system system cmd / (str)system(cmd)

T

tan (num)tan(x)
this this
time (num)time([year[, month[, day[, hour[, minute[, second]]]]]])
typeof (num)typeof(var)

U

until do ... until cond
upper (str)upper(str)

V

val (num)val(tbl, value)
visible visible var_1 [= val_1][, var_2 [= val_2] .. [, var_n [= val_n]]]

W

wait wait ms
wend while cond .. wend
while while cond .. wend
width (num)width(image_id)
window (num)window(title)
wln wln str
wln file wln file file_id, s
write write str
write file write file file_id, x[, bytes[, signed]]

Z

zone (num)zone() / (num)zone(zone_id) / (num)zone(x, y)
zoneh (num)zoneh(zone_id)
zonew (num)zonew(zone_id)
zonex (num)zonex(zone_id)
zoney (num)zoney(zone_id)