[ < ] [ > ]   [ << ] [ 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
Newline character (ASCII 0x0a).
Return character (ASCII 0x0d).
Form-feed character (ASCII 0x0c).
Tab character (ASCII 0x09)
ASCII NUL character (ASCII 0x00).
A byte represented by two-digit hexadecimal number NN. The byte is interpreted as the internal multibyte encoding.
A character whose UCS2 code is represented by four-digit hexadecimal number NNNN.
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