Floating Point Literals: float (f) and real (L) suffix issue

kdevel kdevel at vogtner.de
Fri Jan 12 12:45:59 UTC 2018


suffix.d
```
void main ()
{
    real r = 1.L;
    float f = 1.f;
}
```

$ dmd suffix.d
suffix.d(3): Error: no property 'L' for type 'int'
suffix.d(4): Error: no property 'f' for type 'int'

According to the grammar in dmd2/html/d/spec/lex.html both are 
valid FloatLiterals. Any comments?


More information about the Digitalmars-d-learn mailing list