Command-line arguments: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 1,923: | Line 1,923: | ||
$all_args_without_program_name = array_shift($argv); |
$all_args_without_program_name = array_shift($argv); |
||
</lang> |
</lang> |
||
=={{header|Picat}}== |
|||
Picat has no built-in option parser, and the user must write a specific parser for each use case. The arguments to a Picat programs are available via <code>main/1</code> as a list of strings. |
|||
<lang Picat>main(ARGS) => |
|||
println(ARGS). |
|||
main(_) => true.</lang> |
|||
{{out}} |
|||
<pre>picat command_line_arguments.pi -c "alpha beta" -h "gamma" |
|||
[-c,alpha beta,-h,gamma]</pre> |
|||
See the task [http://rosettacode.org/wiki/Command-line_arguments Command-line_arguments] for a simple option parser. |
|||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |