This is a BASIC interpreter, loosely based off of Commodore 64 BASIC. There is no variable name limit, and lowercase is supported. View the notes for a full list of commands. Some commands can only be run in the console as opposed to in a program, and vice versa. Common commands: <name>=<value> - Assign a variable called <name> the value <value>. <name> - Display the value of variable <name>. Console exclusive. CLEAR - Clears the display. CLS or NEW - Deletes all user created variables in memory. NEW will also delete the current program. Console exclusive. RUN - Run the current program from line 1. Console exclusive. FREE <name> - Delete a variable called <name> from memory. EDIT - Deletes the current program in memory and allows you to write a new one. This command really sucks, and is console exclusive. EXIT - Exits the current console or program.
Console exclusive commands: SAVE - Dumps a code representing the current program to the screen. LOAD <code> - Loads codes made by SAVE. Will overwrite the current program. MEM - Dumps the entire contents of memory to the display. LIST [line] - Displays the specified program line. If line is not specified, the entire program will be displayed. RUN <line> - Runs the program starting from line <line>. CONT - Continues running a program that has terminated for whatever reason. Program exclusive commands: REM - If placed at the start of a line, the entire line will be ignored by the processor. STOP - Stops the program. WAIT <time> - Waits <time> seconds. PRINT <something> - Adds a new blank line to the display, then runs WRITE <something>. WRITE <something> - If <something> is the name of a variable in memory, the value will be printed. Otherwise, <something> will be printed as a string. GOTO <line> - Jumps to the specified line in the program. GOSUB <line> - Similar to GOTO, but allows the program to jump back to the place where GOSUB was called. RETURN - Goes to the line after the one where GOSUB was run. If GOSUB has not been called, this will crash. INPUT <text> - The same as running [ask <text> and wait] from Scratch. Can also be run with <name> = INPUT <text> to assign the response to a variable. IF <condition> THEN <line> - If the condition is true, then the program will jump to <line>. The condition must be formatted like so: <something> [<|=|>] <something else>. Like WRITE, if <something> and/or <something else> are variables, then they will be resolved to their values. Otherwise, they will be treated literally. <name>[+|-|*|/]<value> - Does the mathematical operation on the variable. <value>[+|-|*|/]<value> - Print the result of the mathematical operation to the screen. Built in variables: RND - Contains a random number from 0 to 1 up to 9 digits in length. TI - Contains the amount of time in seconds since the green flag was pressed. NAME - Contains your username or GUEST. This variable, unlike the other two, can be overwritten, but not deleted.