[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.10.1 String syntax

Reader syntax: "..."
[R5RS+] Denotes a literal string. Inside the double quotes, the following backslash escape sequences are recognized.

\"
[R5RS] Double-quote character
\\
[R5RS] Backslash character
\n
Newline character (ASCII 0x0a).
\r
Return character (ASCII 0x0d).
\f
Form-feed character (ASCII 0x0c).
\t
Tab character (ASCII 0x09)
\0
ASCII NUL character (ASCII 0x00).
\xNN
A byte represented by two-digit hexadecimal number NN. The byte is interpreted as the internal multibyte encoding.
\uNNNN
A character whose UCS2 code is represented by four-digit hexadecimal number NNNN.
\UNNNNNNNN
A character whose UCS4 code is represented by eight-digit hexadecimal number NNNNNNNN.

If Gauche is compiled with internal encoding other than UTF-8, the reader uses gauche.charconv module to interpret \uNNNN and \UNNNNNNNN escape sequence.

Reader syntax: #*"..."
Denotes incomplete string. The same escape sequences as the complete string syntax are recognized.

Note: literal incomplete strings used to be #"...". As of Gauche 0.6.3, the syntax switched to #*"...". The old syntax is still recognized, but eventually will fade away. String interpolation will eventually take #"..." syntax.

Rationale of the syntax: '#*' is used for bit vector in Common Lisp. Since an incomplete strings is really a byte vector, it has similarity. (Bit vector can be added later, if necessary, and two can coexist).



This document was generated by Ken Dickey on November, 28 2002 using texi2html