FloatLiteral 1f

Jerry Quinn jlquinn at optonline.net
Wed Jul 28 05:06:33 PDT 2010


> On 27/07/2010 21:46, Philip Trettner wrote:
> > Hello.
> >
> > When I came across the lexical definition of a FloatLiteral I wondered
> > how '1f' gets recognized.
> >
> > The definition says:
> > FloatLiteral:
> > 	Float
> > 	Float Suffix
> > 	Integer ImaginarySuffix
> > 	Integer FloatSuffix ImaginarySuffix
> > 	Integer RealSuffix ImaginarySuffix
> >
> > Float contains a dot or an exponent, so this cannot be.
> > The suffixes for integers are only imaginary, so '1f' won't be
> > recognized either.
> >
> > But the D Compiler compiles fine (as it should be).
> >
> > Am I missing something or is this a flaw in the FloatLiteral
> > definition?
> >
> > kind regards, Philip

This was reported in bug 949:

http://d.puremagic.com/issues/show_bug.cgi?id=949



More information about the Digitalmars-d mailing list