TRS-80 Model I Level 2 BASIC Language Reference
By Joe Ganley
The following is republished on my site, unchanged (other than this line), with permission of Ron Kneusel
This document is in beta release and has been discontinued by its prior author.
Multiple commands can appear on a single line; these commands are
separated from one another by the ":" character.
In addition, commands (or multiple commands separated by
":") can be entered directly, without a line number.
These commands are executed immediately, as soon as the line is
Some commands have no effect (e.g. DATA) or do not make
sense (e.g. RETURN) when entered
without a line number.
Other commands (e.g. NEW) are almost
always used without a line number.
The first time the FOR statement is hit,
VN is set to N1.
When the NEXT is hit, the value of
VN is incremented by N3, or by
1 if the STEP clause is absent.
If the resulting value is less than or equal to
N2, then control is transferred back to
the statement following the FOR statement; otherwise,
control continues to the statement following the NEXT.
If the NEXT has no argument, then it is associated with
the nearest matching FOR.
NEXT VI,VJ is equivalent to NEXT VI:NEXT VJ.
It is permissible to modify VN inside the
The looping happens at the NEXT, so a FOR
with no matching NEXT is equivalent to
VN = N1.
A NEXT without a matching FOR causes a