Loops/Continue: Difference between revisions

→‎{{header|REXX}}: used a better illustration of the ITERATE statement, added comments and whitespace. -- ~~~~
(Added F# solution. Added note regarding COBOL's CONTINUE verb.)
(→‎{{header|REXX}}: used a better illustration of the ITERATE statement, added comments and whitespace. -- ~~~~)
Line 1,068:
 
=={{header|REXX}}==
(This program could be simplier by using a   '''then/else'''   construct, but an   '''iterate'''   was used to conform to the task.)
<lang rexx>/*REXX program toillustrates a illustrate DO loop with an ITERATE (continue). */
 
do j=1 for 10 /*equivalent to: DO J=1 TO 10 */
do j=1 to 10
call charout , j", " /*write the integer to terminal. */
if j//5\==0 then do /*Not a multiple of five? Then..*/
 
call charout , ", " /*write a comma to the terminal, */
if j//5==0 then do
iterate say /*... & then go back for next int*/
iterateend
say end /*force REXX display to next line*/
end /*j*/</lang>
/*stick a fork in it, we're done.*/</lang>
Program note: &nbsp; the comma (,) immediately after the &nbsp; '''charout''' &nbsp; BIF indicates to use the terminal output stream.
<br><br>
 
=={{header|Ruby}}==