Loop structures: Difference between revisions
Content added Content deleted
(+ Befunge) |
|||
Line 71: | Line 71: | ||
display dialog i |
display dialog i |
||
end repeat |
end repeat |
||
==[[Befunge]]== |
|||
[[Category:Befunge]] |
|||
Befunge does not have specific loop statements, but any type of loop construct can be created using the branch (_|) skip (#) and direction (<>v^) commands. For example, the following is one possible structure for a while loop: |
|||
enter > test v |
|||
^ body _ exit |
|||
This program is like a for-loop in other languages, printing the digits from nine down to zero. |
|||
9>:.:#v_@ |
|||
^ -1 < |
|||
==[[C]]== |
==[[C]]== |