There are two types of strings defined by a stream of characters surrounded by either single quotes ' or double quotes "
|
Single-quoted strings are perhaps the simplest
|
Inside such strings ALL characters including newlines are treated literally except that ' must be represented as \' and \ as \\
-
In particular, \n does NOT represent a newline
-
Example: 'don\'t' is the five character word don't
|
As in C, ALL strings are stored as zero-byte terminated byte streams so that
-
'' and "" are both stored internally as one byte 00 (octal zero)
|