Nested function: Difference between revisions

m
→‎{{header|REXX}}: simplified the code.
m (→‎{{header|REXX}}: added/changed whitespace and comments.)
m (→‎{{header|REXX}}: simplified the code.)
Line 1,150:
<lang rexx>/*REXX program demonstrates that functions can be nested (an outer and inner function).*/
ctr= 0 /*initialize the CTR REXX variable.*/
call makeList '. ' /*invoke makeList with the separator.*/
exit 0 /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
makeItem: parse arg sep,text; ctr= ctr + 1 /*bump the counter variable. */
say ctr || sep || word(string, ctr) /*display three thingys to the terminal*/
return
/*──────────────────────────────────────────────────────────────────────────────────────*/