[Mono-dev] Program Option Parsing Library
"Andrés G. Aragoneses"
knocte at gmail.com
Sun Jan 13 13:45:24 EST 2008
Jay Logue escribió:
> Jonathan Pryor wrote:
>> As for what Getopt::Long does... "--foo --bar" sets "--bar" as the
>> value of the --foo argument. "--bar --foo" (i.e. no argument for --foo)
>> generates the output:
>>
>> Option foo requires an argument
>>
>> I'm conflicted as to which is the better behavior.
> Yeah, that's a tough one. I probably lean towards the Getopt behavior
> as its easier to explain, e.g. "if --foo takes a value, then whatever
> comes after it will be treated as a value, regardless of what it looks
> like".
What about giving a warning (or a Y/N confirmation) if --foo receives as
an argument a string that starts with "-" or "--"?
Regards,
Andrés [ knocte ]
--
More information about the Mono-devel-list
mailing list