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.
In reply to Re^4: Issues w/ getOptions parsing options with pass_through enabled
by Crackers2
in thread Issues w/ getOptions parsing options with pass_through enabled
by Brawny1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |