www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Real suffix reques

reply nail <nail_member pathlink.com> writes:
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
Feb 09 2005
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
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
Feb 09 2005
parent reply "Walter" <newshound digitalmars.com> writes:
Both instances now fixed. Thanks, -Walter
Feb 09 2005
next sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
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
Feb 10 2005
prev sibling parent nail <nail_member pathlink.com> writes:
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
Feb 10 2005