Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

2.4.3 Floating-Point Literals

Visual Studio .NET 2003

A floating-point literal is an integer literal followed by an optional decimal point (the ASCII period character) and mantissa, and an optional base 10 exponent. By default, a floating-point literal is of type Double. If the Single, Double, or Decimal type character is specified, the literal is of that type. If a floating-point literal's type is of insufficient size to hold the floating-point literal, a compile-time error results.

FloatingPointLiteral ::=
   FloatingPointLiteralValue [ FloatingPointTypeCharacter ] |
   IntLiteral FloatingPointTypeCharacter
FloatingPointTypeCharacter ::=
   SingleCharacter |
   DoubleCharacter |
   DecimalCharacter |
   SingleTypeCharacter |
   DoubleTypeCharacter |
   DecimalTypeCharacter
SingleCharacter ::= F
DoubleCharacter ::= R
DecimalCharacter ::= D 
FloatingPointLiteralValue ::=
   IntLiteral . IntLiteral [ Exponent ] |
   . IntLiteral [ Exponent ] |
   IntLiteral Exponent
Exponent ::= E [ Sign ] IntLiteral
Sign ::= + | -

See Also

2.4.1 Boolean Literals | 2.4.2 Integer Literals | 2.4.4 String Literals | 2.4.5 Character Literals | 2.4.6 Date Literals | 2.4.7 Nothing | 2.4 Literals

Show:
© 2014 Microsoft. All rights reserved.