On Friday, 19 May 2017 at 12:09:38 UTC, Suliman wrote:
I would like to check if user specified `0` as getopt parameter. But the problem that `int`'s are default in `0`. So if user did not specified nothing `int x` will be zero, and all other code will work as if it's zero.

One way to do this is the use a callback function or delegate. Have the callback set both the main variable and a boolean tracking whether the option was entered.

--Jon

Reply via email to