Command-line arguments: Difference between revisions

Content added Content deleted
Line 539: Line 539:
import extensions.
import extensions.
public program =
public program
[
[
program_arguments forEvery(:i)<int>
program_arguments forEvery(:i)<int>
[ console printLine("Argument ",i," is ",program_arguments[i]) ]
[ console printLine("Argument ",i," is ",program_arguments[i]) ]
].</lang>
]</lang>
{{out}}
{{out}}
<pre>
<pre>
Argument 0 is myprogram.exe
Argument 0 is myprogram.exe
Argument 1 is -c
Argument 1 is -c
Argument 2 is "alpha
Argument 2 is alpha beta
Argument 3 is beta"
Argument 3 is -h
Argument 4 is -h
Argument 4 is gamma
Argument 5 is "gamma"
</pre>
</pre>