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
On Friday, May 19, 2017 12:09:38 PM PDT Suliman via Digitalmars-d-learn
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
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.
In std.typecons I found Nullable that allow init int to zero. I
tried to