Next: Booleans, Previous: Integer Literals, Up: Integers [Contents][Index]
8-bit unsigned integers can use an alternative literal notation that
is useful when working with ASCII character codes. Printable
character codes can be denoted with 'c'.
Non-printable characters can be expressed using escape-sequences. The allowed sequences are:
\nNew-line character (ASCII 012).
\tTab character (ASCII 011).
\\The backslash character.
\[0-9][0-9]?[0-9]?Character whose ASCII code is the specified number, in octal.
Examples:
'o' '\n' '\t' '\\' '\0'
The type of a character literal is always char, aka
uint<8>.