660e52bdcb
FossilOrigin-Name: 1a43743f43076eb087ee4dd7fbfa96b8dfda2aa4ddcff41e6a5a9634ba6e239c
25 lines
386 B
Text
Executable file
25 lines
386 B
Text
Executable file
#!/usr/bin/env retro
|
|
|
|
This is a simple `echo` style example.
|
|
|
|
~~~
|
|
#0 script:get-argument
|
|
~~~
|
|
|
|
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
|
|
~~~
|