9e03717deb
FossilOrigin-Name: 088675e452ed86a712563c8b2597fe4d47da59bdea0e40becdd1e028a84c47b0
25 lines
383 B
Text
Executable file
25 lines
383 B
Text
Executable file
#!/usr/bin/env retro
|
|
|
|
This is a simple `echo` style example.
|
|
|
|
~~~
|
|
#0 script:arguments
|
|
~~~
|
|
|
|
Then a simple loop:
|
|
|
|
- duplicate the argument number
|
|
- get the argument as a string
|
|
- display it, followed by a space
|
|
- increment the argument number
|
|
|
|
~~~
|
|
[ dup script:get-argument s:put sp n:inc ] times
|
|
~~~
|
|
|
|
And at the end, discard the argument number and inject a
|
|
newline.
|
|
|
|
~~~
|
|
drop nl
|
|
~~~
|