clipp icon indicating copy to clipboard operation
clipp copied to clipboard

Parse error for float/double with leading dot

Open precise-simulation opened this issue 3 years ago • 0 comments

I could have misunderstood how to use clipp properly but I have found using multiple optional numeric values with leading dot leads to incorrect parsing, for example:

double a, b;
auto FOO = (command("foo").set(selected,mode::FOO),
            opt_value("a", a) & opt_value("b", b));

gives the correct values when called as "> foo 0.1 0.2", but when called as "> foo .1 .2" this results in

a = 0
b = 1.2

precise-simulation avatar Sep 20 '20 08:09 precise-simulation