Loops/Foreach: Difference between revisions
Content added Content deleted
m (Added omit from tag for COBOL.) |
(There is a foreach loop in COBOL after all (although not standard-compliant). Corrected PL/I lang tag.) |
||
Line 429: | Line 429: | ||
message(${file}) |
message(${file}) |
||
endforeach(file)</lang> |
endforeach(file)</lang> |
||
⚫ | |||
The following is in the Managed COBOL dialect: |
|||
{{trans|C#}} |
|||
{{works with|Visual COBOL}} |
|||
<lang cobol>01 things occurs 3. |
|||
... |
|||
set content of things to ("Apple", "Banana", "Coconut") |
|||
perform varying thing as string through things |
|||
display thing |
|||
end-perform</lang> |
|||
=={{header|Common Lisp}}== |
=={{header|Common Lisp}}== |
||
Line 1,127: | Line 1,138: | ||
=={{header|PL/I}}== |
=={{header|PL/I}}== |
||
<lang |
<lang pli>declare A(10) fixed binary; |
||
do i = lbound(A,1) to hbound(A,1); |
do i = lbound(A,1) to hbound(A,1); |
||
put skip list (A(i)); |
put skip list (A(i)); |
||
Line 1,475: | Line 1,486: | ||
</xsl:for-each></lang> |
</xsl:for-each></lang> |
||
⚫ | |||
{{omit from|GUISS}} |
{{omit from|GUISS}} |