Floating point literal definition

ric maicle via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Feb 29 22:22:44 PST 2016


I'm currently reading about floating point literal and came to this
part:

     FloatLiteral:
         ...
         Integer ImaginarySuffix
         Integer FloatSuffix ImaginarySuffix
         Integer RealSuffix ImaginarySuffix

Going to the Integer link, it is defined as:

     Integer:
         ...
         BinaryInteger

and BinaryInteger is defined as:

     BinaryInteger:
         BinPrefix BinaryDigitsUS

This program produces the error: semicolon expected, not 'b01f'.

void main()
{
     double d = 0b01f;
}

So, does D allow floating point literals in binary format or not?
If not then the floating point literal definition is a bit misleading.
Or maybe someone had already filed a bug report on this?


More information about the Digitalmars-d-learn mailing list