Bug 40 – DecimalFloat spec doesn't match dmd behavior

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D1 (retired)
Platform
PowerPC
OS
Mac OS X
Creation time
2006-03-12T13:00:00Z
Last change time
2014-02-15T02:15:16Z
Keywords
rejects-valid, spec
Assigned to
bugzilla
Creator
braddr
Blocks
677

Comments

Comment #0 by braddr — 2006-03-12T13:00:18Z
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.) Thanks, -[Unknown]
Comment #1 by bugzilla — 2006-12-27T01:57:50Z
Fixed DMD 0.178