Loops/Do-while: Difference between revisions
Content added Content deleted
m ({{omit from|GUISS}}) |
No edit summary |
||
Line 476: | Line 476: | ||
} while (x % 6 != 0)</lang> |
} while (x % 6 != 0)</lang> |
||
=={{header| |
=={{header|NetRexx}}== |
||
In NetRexx the '''do–while''' construct is implemented via the <code>until ''expru''</code> conditional clause of the <code>loop</code> instruction. The expression ''expru'' in the <code>until ''expru''</code> clause is evaluated at the end of the loop, guaranteeing that the loop will be executed at least once. |
|||
⚫ | |||
<lang NetRexx>/* NetRexx */ |
|||
⚫ | |||
options replace format comments java crossref savelog symbols nobinary |
|||
⚫ | |||
⚫ | |||
say |
|||
⚫ | |||
say 'Loops/Do-while' |
|||
⚫ | |||
⚫ | |||
i_ = 0 |
|||
loop until i_ // 6 = 0 |
|||
i_ = i_ + 1 |
|||
say i_ |
|||
end |
|||
</lang> |
</lang> |
||
Line 495: | Line 500: | ||
in |
in |
||
loop 0</lang> |
loop 0</lang> |
||
=={{header|Objeck}}== |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
</lang> |
|||
or implementing a generic do-while iterator with higher order function: |
or implementing a generic do-while iterator with higher order function: |