Loops/Foreach: Difference between revisions
Content added Content deleted
m (→{{header|Euphoria}}: <lang> -> <lang Euphoria>) |
(Added solution for Action!) |
||
Line 47: | Line 47: | ||
SYM |
SYM |
||
NIL |
NIL |
||
</pre> |
|||
=={{header|Action!}}== |
|||
In Action! there is no for-each loop. |
|||
<lang Action!>PROC Main() |
|||
DEFINE PTR="CARD" |
|||
BYTE i |
|||
PTR ARRAY items(10) |
|||
items(0)="First" items(1)="Second" |
|||
items(2)="Third" items(3)="Fourth" |
|||
items(4)="Fifth" items(5)="Sixth" |
|||
items(6)="Seventh" items(7)="Eighth" |
|||
items(8)="Ninth" items(9)="Tenth" |
|||
PrintE("In Action! there is no for-each loop") |
|||
PutE() |
|||
FOR i=0 TO 9 |
|||
DO |
|||
PrintE(items(i)) |
|||
OD |
|||
RETURN</lang> |
|||
{{out}} |
|||
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Foreach.png Screenshot from Atari 8-bit computer] |
|||
<pre> |
|||
In Action! there is no for-each loop |
|||
First |
|||
Second |
|||
Third |
|||
Fourth |
|||
Fifth |
|||
Sixth |
|||
Seventh |
|||
Eighth |
|||
Ninth |
|||
Tenth |
|||
</pre> |
</pre> |
||