Loops/Foreach: Difference between revisions

Content added Content deleted
(Add LDPL)
(→‎{{header|ALGOL 68}}: Corrected the ALGOL 68 RS FORALL syntax)
Line 284: Line 284:
<br>
<br>
<br>[[ALGOL 68RS]] and [[Algol68toc]] have a FORALL loop, the following is equivalent to the example above:
<br>[[ALGOL 68RS]] and [[Algol68toc]] have a FORALL loop, the following is equivalent to the example above:
<syntaxhighlight lang="algol68">FORALL index IN collection DO
<syntaxhighlight lang="algol68">FORALL c IN collection DO
print((collection[index]," "))
print((c," "))
OD</syntaxhighlight>
OD</syntaxhighlight>