Keyword list

?Alias to PRINT
'Alias to REM
ATTRBCharacter attributes
BOX (x1,y1)-(x2,y2)Draws a rectangle (the top left pixel is (0,0)
BOXF (x1,y1)-(x2,y2),colorFills a rectangle with the given color (optional, if not given use the current pen color). Negative colors lead to filling with the requested color as the background one.
CLSClear screen
COLOR foreground,backgroundChange pen colors (parameters are optional)
ENDEnds program execution
FOR v=s TO e STEP nFOR loop, incrementing v by n each time until it reaches e. The STEP is optional (default is 1) and can be negative.
GOTO lineJump to program line
IF a THEN statement ELSE statementConditions (the statement can be just a line number)
INPUT “message”;variable1,variable2Set variables to user-entered values (comma separated). A ? is printed after the message and before reading the values from the user.
LINE (x1,y1)-(x2,y2)Draws a line (first point is optional, current cursor position is used: LINE -(x2,y2))
LIST lineList the program in memory (parameter is optional, if missing the whole program is listed)
LOCATE x,yMove the cursor
NEWNew program, remove current one from memory
NEXT vCloses FOR loop.
PLAY s$Plays music. The string is made of notes DO,RE,MI,FA,SO,LA,SI (with # and b modifiers), octave changes (O1-O5), note duration changes (L1-L96), silences (P), tempo changes (T1-T256), attack settings (A0-A255). Spaces are ignored and can be used for readability
PRINT valuePrints a value (if the value is suffixed with a ; insert a tabulation after it. else goes to next line)
PSET(x,y)Set a pixel
REMComments (REMark). Anything following this on the line is ignored.
RUNrun the program
SCREEN foreground,background,borderChangecolors for whole screen
INT(v)Integer part of value
LEFT$(s$,n)Get a substring of the N first chars of S
LEN(s$)Get length of string
RIGHT$(s$,n)Get a substring of the N last chars of S
RNDRandom value between 0 and 1
+Addition, string concatenation
@Integer division

Tips and tricks

The PLAY command can be used for accurate delays.

documentations/basic_keywords.txt · Last modified: 2015/03/15 07:41 by pulkomandy
CC0 1.0 Universal
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0