Specifications:
Line numbers are required before every statement. Variable namess are auto defined.
There's one single dimensional array called @(). The index may be any expression and is virtually unlimited.
PRINT statements may output double quoted literal text or expression evaluations. Ouput elements may be combined with commas or semicolons.
Program execution stops after 30 seconds. If the program is still looping after 30 seconds, it will end execution and output whatever was printed.
Whenever you select run, an encoded URL containing your program will be generated. You may bookmark or share it anywhere including links, iframes, and popups.
The HTML command is used to start sending output from PRINT to the html area below the text area. This command should only be called once when the program is done sending output to the text area.
The GET command is an advanced feature intended to be used with URL encoded programs. The command returns the contents of a variable with the same name from the URL. Variable names must be upper case in the URL.
Negation of variables is done with v * -1 and not -v.
Combining statements using semicolons is not supported. IF statements may only be used for line jumps and may not include another statement on the same line.
Keywords:
Commands: |
LET variable = expression PRINT expression IF expression THEN expression GOTO expression GOSUB expression RETURN FOR variable = expression TO expression STEP expression NEXT variable BREAK variable END REM comment HTML GET variable |
Functions: | ABS(), INT(), SQR(), SIN(), COS(), TAN(), ATN(), LOG(), EXP(), SGN(), ROUND(), PRIME(), FACTORIAL(), RND, PI |
Operators by precedence: | NOT(), ^, MOD, *, /, +, -, <, >, <=, >=, =, <>, XOR, AND, OR |
For questions, comments, or sharing your work visit the Net Basic support forum.