25.4.1 String Literals

NULL-terminated sequences of ASCII codes can be denoted using the following syntax:

"foo"

Poke string values are very similar to C strings. They comprise a sequence of 8-bit character codes, terminated by the value 0UB.

The following escape sequences are supported inside string literals:

\n

Denotes a new line character.

\t

Denotes an horizontal tab.

\\

Denotes a backlash \ character.

\"

Denotes a double-quote " character.

\num

num is a number in the range 1 to 255 (inclusive) in base 8.

\xnum

num is a number in the range 1 to 255 (inclusive) in base 16.

Strings cannot contain 0UB character, and inserting one using escape sequences (\0 or \x0) leads to compilation error.