Installation guide
108 Programming Commands
FOR ... NEXT ... STEP  Program Flow Control
ACTION: Repeats a block of statements a specified number of times.
PROGRAM SYNTAX: FOR counter=start# TO end# [STEP increment]
 statements
 [EXIT FOR]
 statements
NEXT [counter]
REMARKS: Counter is a variable used as the loop counter.
Start# is the initial value of the counter.
End# is the end value of the counter.
Increment is the amount the counter is changed each time through the
loop. If STEP is not specified, increment defaults to one.
If end# is greater than start# then increment must be positive. If start#
is greater than end# then increment must be negative. If these condi-
tions are not met the loop will not execute, control is transferred to the
next statement following the NEXT statement. If  start# equals  end#
then the loop will execute once regardless of the increment value. If in-
crement equals zero the loop will execute indefinitely.
EXIT FOR is an alternate exit from a FOR ... NEXT loop.
EXIT FOR transfers control to the statement following the NEXT
statement. When used within nested FOR ... NEXT statements, EXIT
FOR transfers out of the immediate enclosing loop. EXIT FOR can be
used only in a FOR ... NEXT statement.
EXAMPLES: FOR x=1 TO 8 STEP 1
 statements
NEXT x
A=2.4
FOR X =1 to A STEP 1
Statements
NEXT X ‘ This loop will execute 2 times (X=1 & X=2)










