Expand description
Command-line argument handling for Seq
Provides access to command-line arguments passed to the program.
§Usage from Seq
arg-count # ( -- Int ) number of arguments (including program name)
0 arg # ( Int -- String ) get argument at index§Example
: main ( -- Int )
arg-count 1 > if
1 arg write_line # Print first argument (after program name)
else
"No arguments provided" write_line
then
0
;Re-exports§
pub use patch_seq_arg_at as arg_at;pub use patch_seq_arg_count as arg_count;pub use patch_seq_args_init as args_init;
Functions§
- patch_
seq_ ⚠arg_ at - Get command-line argument at index
- patch_
seq_ ⚠arg_ count - Get the number of command-line arguments
- patch_
seq_ ⚠args_ init - Initialize command-line arguments from C-style argc/argv