[Bug 40] New: DecimalFloat spec doesn't match dmd behavior
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Mar 12 11:00:19 PST 2006
    
    
  
http://d.puremagic.com/bugzilla/show_bug.cgi?id=40
           Summary: DecimalFloat spec doesn't match dmd behavior
           Product: D
           Version: 0.149
          Platform: Macintosh
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: braddr at puremagic.com
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]
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list