A STRING is a sequence of arbitrary characters. A string may
have any (nonnegative integer) length, and takes one byte of storage for
each character. A string is explicitly specified by enclosing the
characters of the string between single right-hand quotes or between
double quotes, like so:
'a string' "another string"
Such an explicit string specification is called a literal string. An empty literal string is specified by two single or double quotes, as follows:
'' ""
The kind of quote character that introduced the string is referred to as the active quote character. Within a string delimited by one kind of quotes, the inactive other kind is treated as a regular character. For example:
ANA>t,"It's wonderful!" It's wonderful! ANA>
If you insist on specifying an active quote character as explicit part of a literal string, then include a pair of such quote characters, as illustrated by the following example:
ANA>t,'It''s wonderful!' It's wonderful! ANA>
All C-style escape sequences are honored in literal strings. For
example, \n inside a literal string is replaced by the newline
character. All such escape sequences start with a backslash \.
The recognized escape sequences are:
\n
\t
\v
\b
\r
\f
\a
\\
\?
\'
\"
\ooo
\xhh
Internally, these escape sequences are replaced by a byte code that uniquely identifies them, just as happens to ordinary characters. O
most if not all computers, newline means "go to the start of the next line", carriage return means "go to the start of the current line", and backspace means "go one position closer to the start of the current line without deleting the current character". One can extract parts of a string by using subscripts (Subscripts).