User Tools

Site Tools


crpl:docs:do

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
crpl:docs:do [2013/02/03 14:37] virgilwcrpl:docs:do [2021/02/05 11:43] (current) – Rmoved discussion tag Karsten75
Line 1: Line 1:
-~~DISCUSSION~~+
 <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#flow_control|Flow Control]] <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#flow_control|Flow Control]]
 =====  do  ===== =====  do  =====
  
-^Arguments^Result^Notation^ +^ Arguments ^ Result ^ Notation ^ 
-|Limit and Index| |''i1 i2 -- ''|+|Limit and Index| |%%i1 i2 --%%|
  
  
 === Description === === 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+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: [[crpl:docs:i|I]][[crpl:docs:i|J]] and [[crpl:docs:i|K]]. 
 + 
 +For more complex loops, see [[crpl:docs:while|While]]. 
 + 
 +<note tip>Limit comes first, then the initial value (index).  This means that the first number should always be bigger than the second number.</note>
 === Examples === === Examples ===
 <code> <code>
crpl/docs/do.1359920263.txt.gz · Last modified: 2014/10/01 15:02 (external edit)