Thread overview
Real suffix reques
Feb 09, 2005
nail
Feb 10, 2005
Walter
Feb 10, 2005
nail
February 09, 2005
Hi all.

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

nail-mail<at>mail<dot>ru
February 09, 2005
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
February 10, 2005
Both instances now fixed. Thanks, -Walter


February 10, 2005
Walter wrote:

> Both instances now fixed. Thanks, -Walter

There's more like that on the Wiki4D, as requested:
http://www.prowiki.org/wiki4d/wiki.cgi?DocComments

Do you want a posting here or on the digitalmars.D.bugs list too ?
That can be arranged, if it helps to clean up the D specification.

--anders
February 10, 2005
In article <cuetmu$14e0$1@digitaldaemon.com>, Walter says...
>
>Both instances now fixed. Thanks, -Walter
>
>

Hurray! Thanx.

Victor Nakoryakov
nail-mail<at>mail<dot>ru