Loops/Increment loop index within loop body: Difference between revisions
Content added Content deleted
(add RPL) |
m (→{{header|RPL}}: typo) |
||
Line 4,372: | Line 4,372: | ||
'''STEP''' |
'''STEP''' |
||
≫ |
≫ |
||
It is nevertheless more idiomatic to use a <code>WHILE..REPEAT</code> loop: |
It is nevertheless more idiomatic to use a <code>WHILE..REPEAT</code> loop, managing the loop index in the stack: |
||
≪ 0 42 |
≪ 0 42 |
||
'''WHILE''' OVER 12 < '''REPEAT''' |
'''WHILE''' OVER 12 < '''REPEAT''' |
||
Line 4,381: | Line 4,381: | ||
'''END''' DROP |
'''END''' DROP |
||
≫ |
≫ |
||
=={{header|Ruby}}== |
=={{header|Ruby}}== |