Retro Rocket OS
BASIC-Powered Operating System
Loading...
Searching...
No Matches
BASIC Language Reference

Creating BASIC programs

Programs in Retro Rocket BASIC are similar in structure to other BASIC dialects, with some important differences:

  • Line numbers are optional.
    • If used, each must be greater than the one before it.
    • Gaps in numbering are allowed.
    • If the first character of the file is not a digit (0–9), the program is assumed to have no line numbers.
  • Sequential execution. Programs execute line by line, top to bottom, unless redirected with control statements (e.g. GOTO, IF, PROC, FUNCTION).
  • Statements. Each line must contain at least one valid statement, with any required parameters.
  • Variables. Four types of variables are available (see Variable Types). Variables may be:
    • Local to the current program, or
    • Inherited by other programs run with CHAIN or similar mechanisms.

For real-world examples of programs in the operating system, see the os/programs directory in the source tree.


Further Reference