Node:Escape Sequences, Next:, Previous:Token String, Up:Full Syntax



Escape Sequences

A backslash occurring inside integers in 0' notation or inside quoted atoms or strings has special meaning, and indicates the start of an escape sequence. Character escaping can be turned off for compatibility with old code. The following escape sequences exist:

\b
backspace (character code 8)
\t
horizontal tab (character code 9)
\n
newline (character code 10)
\v
vertical tab (character code 11)
\f
form feed (character code 12)
\r
carriage return (character code 13)
\e
escape (character code 27)
\d
\^? [SICStus only]
delete (character code 127)
\a
alarm (character code 7)
\xhex-digit...\ [ISO only]
\xhex-digithex-digit [SICStus only]
the character code represented by the hexadecimal digits
\octal-digit...\ [ISO only]
\octal-digit?octal-digit?octal-digit [SICStus only]
the character code represented by the octal digits.
\^char [SICStus only]
the character code char mod 32, where char is a letter.
\layout-char [SICStus only]
A single layout character, for example a newline, is ignored.
\c
All characters up to, but not including, the next non-layout character are ignored in sicstus execution mode. In iso execution mode only a single newline character is ignored.
\\, \', \", \`
Stand for the character following the \.
\other [SICStus only]
A character not mentioned in this table stands for itself.