std.getopt error
Ramon
spam at thanks.no
Mon Aug 26 00:20:09 PDT 2013
On Monday, 26 August 2013 at 07:06:07 UTC, growler wrote:
> Given:
>
> int colOrder = 1;
> ...
> Could it be that "-c 1" is ignored because it is in invalid and
> the default colOrder value is used?
Sorry for expressing myself clumsily.
if the commandline arg is "-c 1" (which according to getopt doc
is illegal) it actually *does* work properly.
if the commandline arg is "-c1" (which according to getopt doc
is legal) then the result of getopt is false/wrong.
"-c 1" then sets the variable to -1.
Same with 2. So the problem is not 1 or 1 being the var default.
Thanks - R
More information about the Digitalmars-d
mailing list