For:




Syntax:

for assign to value do

Program body

next

or

for assign to value step increase do

Program body

next

where: assign is a varible assignment whe the varible have to be of type number,
value is a number or a value that the loop should stop at, increase is a number
or a value to increase each loop with.
The for command ends with a next.



Program Example:

for i%=1 to 10 do
show "Line:" at i%,1;
show i% at i%,6
next;
{The loop above shows all the lines from 1 to 10}

for i%=2 to 10 step 2 do
show "Even Line." at i%,10;
next
{The loop above shows the even lines from 2 to 10}

Program File

Application File




Return

Last Updated: July 1998.