Command-line arguments: Difference between revisions
Content added Content deleted
(Added Odin variant) |
|||
Line 2,488: | Line 2,488: | ||
[ dup . char: = emit space ] is #= |
[ dup . char: = emit space ] is #= |
||
1 #args [ i #= show-arg ] countedLoop</syntaxhighlight> |
1 #args [ i #= show-arg ] countedLoop</syntaxhighlight> |
||
=={{header|Transd}}== |
|||
<syntaxhighlight lang="Scheme">#lang transd |
|||
MainModule: { |
|||
_start: (λ |
|||
(textout "Number of arguments: " @numArgs |
|||
"\nArgument list: " @progArgs) |
|||
) |
|||
}</syntaxhighlight> |
|||
Linux command ('tree3' is the name of Transd interpreter): |
|||
tree3 progname -c "alpha beta" -h "gamma" |
|||
{{out}} |
|||
<pre> |
|||
Number of arguments: 5 |
|||
Argument list: ["progname", "-c", "alpha beta", "-h", "gamma"] |
|||
</pre> |
|||
=={{header|TXR}}== |
=={{header|TXR}}== |