# 常數摘要

Visual Studio 2015

`constant`:
floating-point-constant

integer-constant

enumeration-constant

character-constant

floating-point-constant
fractional-constant exponent-part opt floating-suffix opt

digit-sequence exponent-part floating-suffix opt

fractional-constant
digit-sequence opt .digit-sequence

digit-sequence  .

exponent-part
e  sign opt digit-sequence

E  sign opt digit-sequence

sign：下列其中一個
+ –

digit-sequence
digit

digit-sequence digit

floating-suffix：下列其中一個
f l F L

integer-constant
decimal-constant integer-suffix opt

octal-constant integer-suffix opt

decimal-constant:
nonzero-digit

decimal-constant digit

octal-constant
0

octal-constant octal-digit

nonzero-digit：下列其中一個
1 2 3 4 5 6 7 8 9

octal-digit：下列其中一個
0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7 8 9

a b c d e f

A B C D E F

unsigned-suffix：下列其中一個
u U

long-suffix：下列其中一個
l L

character-constant
' c-char-sequence

'L' c-char-sequence '

integer-suffix
unsigned-suffix long-suffix opt

long-suffix unsigned-suffix opt

c-char-sequence
c-char

c-char-sequence c-char

c-char

escape-sequence
simple-escape-sequence

octal-escape-sequence

simple-escape-sequence：下列其中一個
\a \b \f \n \r \t \v

\' \" \\ \?

octal-escape-sequence
\ octal-digit

\ octal-digit octal-digit

\ octal-digit octal-digit octal-digit