A Flexible UNIX Command Line Processing Facility - Args(C++)
Every non-trivial UNIX program accepts command-line arguments.
Processing command-line
arguments might seem like an easy enough task to program,
and thus not worthy of
a general-purpose library, beyond the functionality provided by
getopt(S).
However, there are a number of variations of
command line processing not handled by
getopt(S):
Some programs want to treat both `+' and `-' as option flags, others
only `-'.
Some programs want to allow options and non-option arguments to be
intermixed on the command line, others do not.
Some programs want to allow a certain set of ``keyword'' options.
Some programs want to parse ``suboptions'', others do not.
Given these variations, the universal need for command-line processing, and
the fact that a C++ facility can avoid the global variables necessary with
getopt(S),
it was deemed worthwhile to provide a portable, flexible C++ command-line
processing facility.
Next topic:
Options and option values