getopt
RAMontante
bobmon at iuvax.cs.indiana.edu
Wed Jun 21 14:25:51 AEST 1989
jmm at eci386.UUCP (John Macdonald) <1989Jun19.153426.21238 at eci386.uucp> :
-}
-}"-#" is a not uncommon debugging option. I think ";" is a better choice,
-}since it does half of what ":" does%, and because I don't know of any code
-}that uses "-;" as an option.
-}
-}Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint
-}________
-}% This pun works only if you pronounce them as "semicolon" and "colon".
-
-Surely it would be better (except for punning purposes) to use -? to indicate
-an optional argument. Getopt precludes having a useful ? option since the
-return of ? indicates an error occurred. The ? is also suggests that the
-option is "conditionally present".
I believe that some command-line interpreters (viz., csh?) will attempt
to expand `?' as a wildcard unless it's escaped, at which point using it
becomes a nuisance. I'm not too comfortable with `;' and `:', either,
as some CLI, somewhere, may treat these as statement delimiters or
something. Letters seem like the safest bet to me....
More information about the Comp.lang.c
mailing list