The language constructs of MMBasic include the BASIC elements needed to perform loops (DO) and to perform branching (GOTO/GOSUB) based on tests of data (IF/THEN). These elements also include DATA/READ statements for data stored within the program itself.
Functions and subroutines are also supported in this BASIC implementation. Variables can be local to functions.
Timing routines are supported allowing the programmer to make use of a tick-based interrupt routine.
Multiple Statements Per Line
More than one statement can be on a single program line. For example:
1 2 |
' Data lines SETPIN 25, 8 : SETPIN 26, 8 : SETPIN 27, 8 : SETPIN 28, 8 |
Each statement must be separated by a colon.
In the example above there are four SETPIN statements that each set a different line to be outputs. The program executes the statements from left to right.