DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
A Flexible UNIX Command Line Processing Facility - Args(C++)

Intermixing

Normally, Args treats each command line argument to the right of the first (non-option) argument as a (non-option) argument, regardless of whether it starts with a flag. Thus, if our current program is invoked with

       cc -c foo.c -O

then -O is treated as an argument, not as the -O option. However, if intermixing of options and arguments is desired, this can be specified:

       Args args(argc, argv, "co:OI:D;", Args::intermix);

Now the above invocation will be interpreted the same as

       cc -c -O foo.c

Regardless of whether intermixing is chosen, the special option -- can always be used to indicate that all command line arguments to the right are to be treated as (non-option) arguments, regardless of whether they start with a flag. For example, even under intermixing, the following invocation

       cc -c -- -p foo.c -O

treats -p and -O as (non-option) arguments.


Next topic: `+' options
Previous topic: Suboptions: -D

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005