in reply to Re^3: Issues w/ getOptions parsing options with pass_through enabled
in thread Issues w/ getOptions parsing options with pass_through enabled
When I said "without reading the docs", I meant the GetOpt docs, not the program's docs.
Personally, for any program that uses a dash to start its options, I would assume that any parameter starting with a dash would be treated as an option, whether or not that option is actually valid for the program or not. So the error code I'd expect to get back in the above scenario is "No value of option -cell", regardless of whether -a is a valid option or not, not "Bad vaue for option -cell".
I'm not saying that this is the only way options can be handled, I'm just saying that I believe that's the most intuitive way.
And how your program parses its command line is unrelated to whether it needs to validate its input or not.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Issues w/ getOptions parsing options with pass_through enabled
by ikegami (Patriarch) on May 24, 2006 at 04:43 UTC | |
by Brawny1 (Initiate) on May 24, 2006 at 13:41 UTC |