|Did you know ...||Search Documentation:|
:- use_module(library(optparse)).(can be autoloaded)
Opts is a list of parsed options in the form Key(Value),
or (with the option
functor(Func) given) in the form
Func(Key, Value). Dashed args not in OptsSpec are not
permitted and will raise error (see tip on how to pass unknown flags in
the module description).
PositionalArgs are the remaining non-dashed args after each
flag has taken its argument (filling in
for booleans). There are no restrictions on non-dashed arguments and
they may go anywhere (although it is good practice to put them last).
keepfirst, keeplast, keepallwith the obvious meaning. Default is
or absent). Flagless options cannot be manipulated from the command line and will not show up in the generated help. This is useful when you have (also) general configuration parameters in your OptsSpec, especially if you think they one day might need to be controlled externally. See example in the module overview.
allow_empty_flag_spec(false)gives the more customary behaviour of raising error on empty flags.