What's the rationale for considering "0x1.max" as invalid ?

Alex Parrill via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Apr 5 13:56:54 PDT 2016


On Tuesday, 5 April 2016 at 19:00:43 UTC, Basile B. wrote:
> 0x1.max // exponent expected in hex float
> 0x1 .max // OK
> 1.max // OK
>
> What's the ambiguity when it's an hex literal ?

It's potentially ambiguous with hexadecimal floating point numbers

0xdeadbeef.p5 // hex float or hex int + method?

dlang.org/spec/lex.html#HexFloat


More information about the Digitalmars-d-learn mailing list