5.4.5. String Constant

[Tip]Description

A string constant are ASM constants which represent regular Java-like strings.

[Important]Syntax
StringConstantAST ::= StringLiteral

A string is a sequence of characters. In the constant representation it is surrounded with double quotation marks ("). A string literal character can be any printable ASCII character other than a double quotation mark ("). Special escape sequences are defined in Table 2.12, “Escape sequences and special characters in string constants”

Table 2.12. Escape sequences and special characters in string constants

Escape sequenceDescription
\"A double quote character
\'A single quote character
\nA new line character
\tA tabulator character
\bA backspace character
\rA carriage return character
\fA formfeed character
\0..\7An ASCII character with its code
\00..\77An ASCII character with its code
\000..\377An ASCII character with its code


Defined In:  ASM constant

See Also:  arithmetic term, variable,