On Mon, Aug 26, 2013 at 09:20:09AM +0200, Ramon wrote: > 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. [...]
I'd say file a bug for this, since the docs claim that -c1 works, but actually it doesn't. T -- It only takes one twig to burn down a forest.
