This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| crpl:docs:while [2013/01/14 19:05] – created virgilw | crpl:docs:while [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | TODO | + | |
| + | <- [[crpl: | ||
| + | ===== while ===== | ||
| + | |||
| + | ^Arguments^Result^Notation^ | ||
| + | | | |'' | ||
| + | |||
| + | |||
| + | === Description === | ||
| + | Beginning of a while loop. | ||
| + | The statements between a ' | ||
| + | stack that will determine if the loop executes the body of the ' | ||
| + | === Examples === | ||
| + | < | ||
| + | # outputs a set of descending numbers on the trace stack | ||
| + | ShowTraceLog | ||
| + | ClearTraceLog | ||
| + | 5 ->y #create temp variable " | ||
| + | while <-y 0 gt # is y greater than zero? | ||
| + | repeat #repeat this section of code | ||
| + | <-y trace | ||
| + | <-y 1 sub ->y #subtract 1 from y so we don't end in infinite loop | ||
| + | endwhile #rinse and repeat until y is zero. | ||
| + | </ | ||