Repeats a block of statements a specified number of times.
Syntax
for variable = expression1 to expression2
{ statement }...
next
Notes
variable
|
the loop counter.
|
expression1
|
the initial value of the loop counter.
|
expression2
|
the final value of the loop counter.
|
statement
|
any statements to process.
|
Repeats the block of statements 0 or more times.
The loop counter is incremented by 1 each time through the loop.
Example
for i = 1 to 10
println( i )
next
|