This page is a quick-and-dirty command reference for NG-BASIC, the Javascript BASIC interpreter.
IF..THEN..ELSE |
IF condition THEN statement ELSE statement
Conditionally execute a BASIC statement. A statement may also be a line number, in which case GOTO will automatically be executed. Examples: |
GOTO |
GOTO line
Used for flow control, to directly go to another place in the program.Examples: |
GOSUB |
GOSUB line
Go to a sub-routine at line. When the statement Examples: |
RETURN |
RETURN
Flow control, used to jump back to the GOSUB that we came from. Examples: |
FOR..NEXT |
Go to a sub-routine at line. When the statement RETURN is encountered, program execution continues from the GOSUB statement.
Examples:
|
INPUT |
INPUT [quoted question] variable
Used for user input, and can also be used for printing a question to the terminal. Examples: |
PRINT |
PRINT [quoted string]
Go to a sub-routine at line. When the statement Examples: |
| String Functions | |
LINES( ), TAB( ), STR( ), RIGHT( ), LEFT( ), MID( ) |
|
| Numeric Functions | |
LEN( ), VAL( ), GETKEY( ), |
|
Popularity: 5% [?]

Add A Comment
You must be logged in to post a comment.