Costanti carattere CC Character Constants

Una "costante carattere" viene formata racchiudendo tra virgolette singole (' ') un carattere singolo del set di caratteri rappresentabile.A "character constant" is formed by enclosing a single character from the representable character set within single quotation marks (' '). Le costanti carattere vengono usate per rappresentare i caratteri nel set di caratteri di esecuzione.Character constants are used to represent characters in the execution character set.

SintassiSyntax

character-constant:character-constant:
' c-char-sequence '' c-char-sequence '

L' c-char-sequence 'L' c-char-sequence '

c-char-sequence:c-char-sequence:
c-charc-char

c-char-sequence c-charc-char-sequence c-char

c-char:c-char:
Qualsiasi membro del set di caratteri di origine eccetto le virgolette singole ('), la barra rovesciata (\) o il carattere di nuova rigaAny member of the source character set except the single quotation mark ('), backslash (\), or newline character

escape-sequenceescape-sequence

escape-sequence:escape-sequence:
simple-escape-sequencesimple-escape-sequence

octal-escape-sequenceoctal-escape-sequence

hexadecimal-escape-sequencehexadecimal-escape-sequence

simple-escape-sequence: uno trasimple-escape-sequence: one of
\a \b \f \n \r \t \v\a \b \f \n \r \t \v

\' \" \\ \?\' \" \\ \?

octal-escape-sequence:octal-escape-sequence:
\ octal-digit\ octal-digit

\ octal-digit octal-digit\ octal-digit octal-digit

\ octal-digit octal-digit octal-digit\ octal-digit octal-digit octal-digit

hexadecimal-escape-sequence:hexadecimal-escape-sequence:
\x hexadecimal-digit\x hexadecimal-digit

hexadecimal-escape-sequence hexadecimal-digithexadecimal-escape-sequence hexadecimal-digit

Vedere ancheSee Also

Costanti CC Constants