Jon Jagger
jon@jaggersoft.com
Table of Contents 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Notes DownloadECMA-334 C# Language Specificationpreviousnextprevious at this levelnext at this level 9 Lexical structureprevious at this levelnext at this level 9.4 Tokensprevious at this levelnext at this level 9.4.4 Literalsprevious at this levelnext at this level 9.4.4.2 Integer literals Paragraph 11 Integer literals are used to write values of types int, uint, long, and ulong. 2 Integer literals have two possible forms: decimal and hexadecimal. integer-literal :: decimal-integer-literal hexadecimal-integer-literal decimal-integer-literal :: decimal-digits integer-type-suffixopt decimal-digits :: decimal-digit decimal-digits decimal-digit decimal-digit :: one of 0 1 2 3 4 5 6 7 8 9 integer-type-suffix :: one of U u L l UL Ul uL ul LU Lu lU lu hexadecimal-integer-literal :: 0x hex-digits integer-type-suffixopt 0X hex-digits integer-type-suffixopt hex-digits :: hex-digit hex-digits hex-digit hex-digit :: one of 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f Paragraph 21 The type of an integer literal is determined as follows: Paragraph 31 If the value represented by an integer literal is outside the range of the ulong type, a compile-time error occurs. [Note: As a matter of style, it is suggested that "L" be used instead of "l" when writing literals of type long, since it is easy to confuse the letter "l" with the digit "1". end note] Paragraph 41 To permit the smallest possible int and long values to be written as decimal integer literals, the following two rules exist:
{ JSL }
Jagger Software Ltd
Company # 4070126
VAT # 762 5213 42
Valid HTML 4.01Valid CSS