This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
4rpl:baserpl:flow_control:do [2019/03/25 18:26] – Karsten75 | 4rpl:baserpl:flow_control:do [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~NOTOC~~ | ||
- | |||
- | ====== do ====== | ||
- | do (<-Limit <-Index) | ||
- | |||
- | ===== Description ===== | ||
- | The statements following the '' | ||
- | |||
- | NOTE: Limit comes first, then the initial value (index). This means that the first number should usually be bigger than the second number. | ||
- | |||
- | ===== Examples ===== | ||
- | <code 4rpl> | ||
- | |||
- | # single loop | ||
- | do(5 0) | ||
- | | ||
- | loop | ||
- | # Prints: | ||
- | # 0 | ||
- | # 1 | ||
- | # 2 | ||
- | # 3 | ||
- | # 4 | ||
- | |||
- | Nested loops | ||
- | |||
- | do(2 0) | ||
- | trace(I) | ||
- | Do (4 2) | ||
- | Trace2 (J I) | ||
- | Do (6 4) | ||
- | Trace3 (K J I ) | ||
- | loop | ||
- | loop | ||
- | loop | ||
- | |||
- | </ | ||