Jump to content

Flow-control structures: Difference between revisions

m
→‎{{header|REXX}}: clarified the "leave" and "iterate" statements (where located). -- ~~~~
m (→‎call: added another "see also" thingy. -- ~~~~)
m (→‎{{header|REXX}}: clarified the "leave" and "iterate" statements (where located). -- ~~~~)
Line 1,715:
 
===iterate===
The '''iterate''' statement immediately transfer control to the innermost active   '''do'''   statement in which the '''iterate''' statement is located, that is, it (may) iterates (increments or decrements) the named REXX variable (if any) that is specified on the   '''do'''   statement.   The '''iterate''' statement can also specify which   '''do'''   loop is to be iterated if there is a named variable on the '''do''' loop.
 
(All indentations in REXX are merely cosmetic and are used for readability.}
Line 1,738:
 
===leave===
The '''leave''' statement transfer control to the next REXX statement following the   '''end'''   statment of the current (active)   '''do'''   loop in which the '''leave''' statement is located.   The '''leave''' statement can also specify which '''do''' loop is to be left (terminated) if the '''do''' loop has a named variable.
<lang rexx> do j=1 to 10
say 'j=' j
Cookies help us deliver our services. By using our services, you agree to our use of cookies.