Jump to content

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 &nbsp; ''external'' &nbsp; 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 #=1 1 /*assume once if not specified. */
if pN\=='' then call repeats pN, # /*invoke the REPEATS procedure for pN.*/
exit 0 /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
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>
'''{{out|output'''|text=&nbsp; when using the input isof: &nbsp; &nbsp; <tt> yabba &nbsp; 4 </tt>}}
<pre>
Yabba, yabba do!
Cookies help us deliver our services. By using our services, you agree to our use of cookies.