This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
4rpl:commands:do [2021/01/08 16:01] – external edit 127.0.0.1 | 4rpl:commands:do [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
- | < | + | <= [[4rpl: |
+ | <= [[4rpl: | ||
====== do ====== | ====== do ====== | ||
Line 6: | Line 8: | ||
===== Description ===== | ===== Description ===== | ||
- | The statements following the do, up to the loop statement, are executed repeatedly. | + | The statements following the do, up to the [[loop]] statement, are executed repeatedly. |
An index counter is initialized to (start). The index will be incremented, | An index counter is initialized to (start). The index will be incremented, | ||
When the index counter is one away from the limit, execution will proceed at the first statement following Loop. Loops can be nested, but no more than 3 deep. | When the index counter is one away from the limit, execution will proceed at the first statement following Loop. Loops can be nested, but no more than 3 deep. | ||
- | NOTE: If (limit) is less than (start), the the loop decrements rather than incrementing. | + | NOTE: If (limit) is less than (start), the the loop decrements rather than increments. |
- | The range of a do loop is always | + | The range of a do loop is always |
===== Examples ===== | ===== Examples ===== |