<- CRPL reference <- Flow Control
Arguments | Result | Notation |
---|---|---|
Limit and Index | i1 i2 -- |
The statements following the do, up to the loop statement, are executed repeatedly. Each iteration (loop), the initial value (Index) is incremented by one at the bottom of the loop and compared to Limit. When Index=Limit, excecution will proceed at the first statement following Loop.
Loops can be nested, however, indexes of loops with a nesting difference more than 3 will become unreachable, unless they were saved to a variable. See: I, J and K.
For more complex loops, see While.
# Show the trace log, clear it, then show the numbers 0 through 4 in the log ShowTraceLog ClearTraceLog 5 0 do I Trace loop