Anonymous user
Repeat: Difference between revisions
m
→{{header|REXX}}: added whitespace, changed a comment, used a template for the output section.
(Added Quackery.) |
m (→{{header|REXX}}: added whitespace, changed a comment, used a template for the output section.) |
||
Line 1,407:
The procedure name (that is being repeatedly executed) isn't restricted to an ''internal'' REXX subroutine (procedure),
<br>it may be an ''external'' program (procedure) written in any language.
<lang rexx>/*REXX program executes a named procedure a specified number of times.
parse arg pN # . /*obtain optional arguments from the CL*/
if #=='' | #=="," then #=
if pN\=='' then call repeats pN, # /*invoke the REPEATS procedure for pN.*/
exit
/*──────────────────────────────────────────────────────────────────────────────────────*/
repeats: procedure; parse arg x,n /*obtain the procedureName & # of times*/
Line 1,418:
/*──────────────────────────────────────────────────────────────────────────────────────*/
yabba: say 'Yabba, yabba do!'; return /*simple code; no need for PROCEDURE.*/</lang>
<pre>
Yabba, yabba do!
|