Previous Next


                                               54
CHAPTER 3                                                                     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                      Line feed (LF)

\r                      Carriage return (CR)

\t                      Horizontal tab (HT)

\b                      Backspace (BS)

\f                      Form feed (FF)

\(                      Left parenthesis

\)                      Right parenthesis

\\                      Backslash

\ddd                    Character code ddd (octal)


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

Previous Next