DecimalFloat

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Mar 9 13:56:08 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Unknown W. Brackets schrieb am 2006-03-04:
> The documentation currently describes DecimalFloat as:
>
> DecimalFloat:
> 	DecimalDigits .
> 	DecimalDigits . DecimalDigits
> 	DecimalDigits . DecimalDigits DecimalExponent
> 	. DecimalDigits
> 	. DecimalDigits DecimalExponent
> 	DecimalDigits DecimalExponent
>
> I believe this is incorrect.  It should be, by my reasoning:
>
> DecimalFloat:
> 	DecimalDigits .
> 	DecimalDigits . DecimalDigits
> 	DecimalDigits . DecimalDigits DecimalExponent
> 	. Decimal
> 	. Decimal DecimalExponent
> 	DecimalDigits DecimalExponent
>
> The reason I believe this to be is simple.  Try the following code:
>
> writefln(._1);
>
> According to the previous definition of DecimalFloat (as far as I read 
> it), that should be equivalent to:
>
> writefln(.1);
>
> However, it instead generates an error with DMD.  I think this makes the 
> most sense, and serves to clarify that this:
>
> writefln(._);
>
> Is also not a FloatLiteral (which I think is pretty clear.)

Added to DStress as
http://dstress.kuehne.cn/undefined/float_literal_01_A.d
http://dstress.kuehne.cn/undefined/float_literal_01_B.d
http://dstress.kuehne.cn/undefined/float_literal_01_C.d
http://dstress.kuehne.cn/undefined/float_literal_01_D.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFEEK7t3w+/yD4P9tIRAkxoAJ0bSFi7JeME7Fs8oQGOAsvL0UqsGwCgx3Qq
o6g5X/T0R8Y7xDF+/uvd87s=
=Zi23
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list