DEFINES THE END VALUE OF THE VARIABLE V IN A LOOP "FOR"
ACTION
The command "FOR V=S TO E" is the beginning of a group of statements, which ends with NEXT and which uses the variable V as a counter.
The first time, the counter V is initiated with starting value S (V is S).
When NEXT is executed, the counter V is incremented, and then the group of statements between FOR and NEXT is executed again only if V is less than or equal to value in E.
Otherwise, if V is greater than E, the execution jumps to the statement after NEXT.
SYNTAX:
FOR V=S TO E
USE ERROR EXAMPLE
rem print the 10 first integer numbers
dim i
for i=1 to 10
print i
next i
TO
(FOR V=S) TO E
SEE ALSO
FOR
STEP
NEXT