User Tools

Site Tools


crpl:docs:do

This is an old revision of the document!


~~DISCUSSION~~ <- CRPL reference <- Flow Control

do

Arguments Result Notation
Limit and Index i1 i2 --

Description

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, but no more than 3 deep. See also: I, J and K

NOTE: Limit comes first, then the initial value (index). This means that the first number should always be bigger than the second number.

Examples

# Show the trace log, clear it, then show the numbers 0 through 4 in the log 
ShowTraceLog 
ClearTraceLog 
5 0 do 
   I Trace 
loop
crpl/docs/do.1412190170.txt.gz · Last modified: 2014/10/01 15:02 by 127.0.0.1