Radio Shack TRS-80 PC-3 Owner's Manual page 132

Table of Contents

Advertisement

the integer part is used. Expression 3 must be an integer in the range of -32768 to 32767; it may not be zero.
The loop variable may be used within the group of statements, for example as an index to an array, but care should be taken in
changing the value of the loop variable.
Programs should be written so that they never jump from outside a FOR/NEXT pair to a statement within a FOR/NEXT pair.
Similarly, programs must never leave a FOR/NEXT pair by jumping out. Always exit a FOR/NEXT loop via the NEXT statement.
To do this, set the loop variable to a value higher than expression 2.
The group of statements enclosed by a FOR/NEXT pair can include another pair of FOR/NEXT statements which use a different
loop variable, as long as the enclosed pair is completely enclosed: i.e., if a FOR statement is included in the group, the matching
NEXT must also be included. FOR/NEXT pairs may be "nested" up to five levels deep.
132

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents