This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
crpl:docs:do [2013/01/18 06:23] – grauniad | crpl:docs:do [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~DISCUSSION~~ | + | |
<- [[crpl: | <- [[crpl: | ||
===== do ===== | ===== do ===== | ||
- | ^Arguments^Result^Notation^ | + | ^ Arguments ^ Result ^ Notation ^ |
- | |Limit and Index| |'' | + | |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, | + | 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, |
+ | |||
+ | Loops can be nested, | ||
+ | |||
+ | For more complex loops, see [[crpl: | ||
+ | |||
+ | <note tip> | ||
=== Examples === | === Examples === | ||
< | < | ||
Line 14: | Line 20: | ||
ShowTraceLog | ShowTraceLog | ||
ClearTraceLog | ClearTraceLog | ||
- | 5 0 do I | + | 5 0 do |
- | Trace | + | I Trace |
- | loop | + | loop |
</ | </ | ||