| |
| Posted by Anders F Björklund in reply to nail | PermalinkReply |
|
Anders F Björklund
| nail wrote:
> Why type "real" does not have any suffix for explicit constant cast like "f" for
> float, "." for double, "u" for unsigned etc. Sometime it is necessary, and I
> have to write cast(real)123
See http://www.digitalmars.com/d/lex.html#floatliteral:
> Floats can be followed by one f, F, l or L suffix.
> The f or F suffix means it is a float, and l or L means it is an extended.
"extended" has now been renamed to real, spec page is old...
float x = 1.0F;
double y = 1.0;
real z = 1.0L;
Also outdated: http://www.digitalmars.com/d/ctod.html#types
> Primitive Types
> C to D types
> float => float double => double long double => extended _Imaginary long double => imaginary
> _Complex long double => complex
They should now be: float, double, real, ireal, creal.
--anders
|