Anonymous user
Loops/Foreach: Difference between revisions
m
→{{header|REXX}}: indented DO loops, added version names. -- ~~~~
m (→{{header|REXX}}: indented DO loops, added version names. -- ~~~~) |
|||
Line 1,030:
=={{header|REXX}}==
===version 1===
<lang rexx>days = "sunday monday tuesday wednesday thursday friday saturday"
do d = 1 to words(days)
say word(days,d)
end</lang>
===version 2===
<lang rexx>days = "sunday monday tuesday wednesday thursday friday saturday"
hlp = days
do while hlp <> ""
parse var hlp item hlp
say item
end</lang>
===version 3===
{{works with|oorexx}}:
<lang rexx>colors = .bag~of("red","green","blue","pink")
|