Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.lang.c Subject: Re: getopt Summary: choices for invocation options Message-ID: <22421@iuvax.cs.indiana.edu> Date: 21 Jun 89 04:25:51 GMT References: <782@crdgw1.crd.ge.com> <13730@haddock.ima.isc.com> <1989Jun19.153426.21238@eci386.uucp> Reply-To: bobmon@iuvax.cs.indiana.edu (RAMontante) Organization: malkaryotic Lines: 21 jmm@eci386.UUCP (John Macdonald) <1989Jun19.153426.21238@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@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....