I am specifying an option with a ValArg. The value is optional but in case it is not specified, no constant value is an appropriate default. The default is a value computed from all the inputs and depending on other arguments, so it becomes available only later on. Therefore I need to detect wether the default has been used or there was actually an argument specified on the command line. There is no specific value I can use as undefined, even if I guess I could use MINDOUBLE and the chance that one in going to specify it on the command line are quite slim -- but this is a horrible hack, not a solution. Any hint? Thanks,
Just use the isSet() method. It will only return true if the arg has been set on the command line and is smart enough to accomodate the XOR handling, if you're using that.
Let me know if this doesn't behave as you expect.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.