This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:break [2014/10/01 19:02] – external edit 127.0.0.1 | crpl:docs:break [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | + | |
| <- [[crpl: | <- [[crpl: | ||
| ===== break ===== | ===== break ===== | ||
| Line 11: | Line 11: | ||
| === Examples === | === Examples === | ||
| < | < | ||
| - | # Display | + | # Iterate from 0 to 9, but only trace numbers from 0 to 5. |
| + | |||
| + | ShowTraceLog | ||
| + | ClearTraceLog | ||
| + | 10 0 do | ||
| + | I Trace | ||
| + | I 5 gte if | ||
| + | break | ||
| + | endif | ||
| + | loop | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | # Trace random numbers between 0 and 9, until we find number 0. | ||
| ShowTraceLog | ShowTraceLog | ||
| - | ClearTraceLog | + | ClearTraceLog |
| - | 5 0 do | + | while TRUE repeat |
| - | I 2 mod eq0 if #divide inner loop with modulo 2 and test if zero | + | 0 10 RandInt ->random |
| - | Break | + | <-random Trace |
| - | endif | + | < |
| - | I Trace | + | break |
| - | loop | + | endif |
| - | </ | + | endwhile |
| + | </ | ||