[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-source-highlight] C-sharp; number of double type highlighting
From: |
HEMMI, Shigeru |
Subject: |
Re: [Help-source-highlight] C-sharp; number of double type highlighting |
Date: |
Wed, 26 Apr 2006 11:14:00 +0900 |
Dear Lorenzo Bettini,
2006/4/25, Lorenzo Bettini wote:
> > Hello,
> >
> > I encounterd a small problem for a C-sharp source,
> > ---------------------------------------------------------------------------=
> > -
> > namespace Foo
> > {
> > using System;
> > public class Foo
> > {
> > public double one=1.0d;
> > public double fr4=0.25d;
> > }
> > class testing
> > {
> > public static void Main()
> > {
> > Foo x =3D new Foo();
> > Console.WriteLine("one,fr4=3D"+x.one+", "+x.fr4);
> > }
> > }
> > }
> > ---------------------------------------------------------------------------=
> > -
> > Hilighting 1.0d and 0.25d seems a bit wrong.
> >
>
> mhhh... yes that should be a problem in the regular expressions for
> numbers (I'll fix it); do you happen to know whether that's the same of
> C/C++ numbers (I mean are 1.0d and 0.25d valid C/C++ literals)?
>
> thanks
> Lorenzo
As you supposed, 1.0d and 0.25d are NOT valid C/C++ literals.
I checked it out in the following docs.
C# Real literals:
For definition, see "9.4.4.3 Real literals" of page 73.
For examples, see "8.2.1 Predefined types" of page 17.
in http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf
C++ Floating-Point Constants:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_pluslang_c.2b2b_.floating.2d.point_constants.asp
Regards,