CHAPTER 3
54
Syntax
The following are valid literal strings:
( This is a string )
( Strings may contain newlines
and such . )
( Strings may contain balanced parentheses ( ) and
special characters ( * ! & } ^ % and so on ) . )
( The following is an empty string . )
()
( It has zero ( 0 ) length . )
Within a literal string, the backslash (
\
) is used as an escape character for various
purposes, such as to include newline characters, nonprinting ASCII characters,
unbalanced parentheses, or the backslash character itself in the string. The
character immediately following the backslash determines its precise
interpretation (see Table 3.2). If the character following the backslash is not one
of those shown in the table, the backslash is ignored.
TABLE 3.2 Escape sequences in literal strings
SEQUENCE
MEANING
\n
\r
\t
\b
\f
\(
\)
\\
Line feed (LF)
Carriage return (CR)
Horizontal tab (HT)
Backspace (BS)
Form feed (FF)
Left parenthesis
Right parenthesis
Backslash
Character code
ddd
(octal)
\
ddd
If a string is too long to be conveniently placed on a single line, it may be split
across multiple lines by using the backslash character at the end of a line to