Anonymous user
Nested function: Difference between revisions
m
→{{header|REXX}}: added/changed whitespace and comments.
m (→using a class: added phix/class) |
m (→{{header|REXX}}: added/changed whitespace and comments.) |
||
Line 1,148:
This REXX version is modeled after the '''FreeBASIC''' example (and it has the
same limitations).
<lang rexx>/*REXX program
ctr=
call makeList '. ' /*invoke
exit
/*──────────────────────────────────────────────────────────────────────────────────────*/
makeItem: parse arg sep,text; ctr= ctr +
say ctr || sep || word(string, ctr)
return
/*──────────────────────────────────────────────────────────────────────────────────────*/
makeList: parse arg sep; string= 'first second third' /*get arguments; define a
do while ctr<3
call makeItem sep, string
end /*while*/
return</lang>
{{out|output|text= when using the default input:}}
<pre>
1. first
|