guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

doc string syntax


From: Kevin Ryde
Subject: doc string syntax
Date: Mon, 19 Jul 2004 09:16:16 +1000
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

New words for the string syntax section, adding the various \r \n etc
escapes available.  I assume they're meant to be documented features,
regexp-quote mentions them, and \n is in various examples already.



3.2.1.1 String Read Syntax
..........................

The read syntax for strings is an arbitrarily long sequence of
characters enclosed in double quotes ("). (1)

   Backslash is an escape character and can be used to insert the
following special characters.  \" and \\ are R5RS standard, the rest
are Guile extensions, notice they follow C string syntax.

\\
     Backslash character.

\"
     Double quote character (an unescaped " is otherwise the end of the
     string).

\0
     NUL character (ASCII 0).

\a
     Bell character (ASCII 7).

\f
     Formfeed character (ASCII 12).

\n
     Newline character (ASCII 10).

\r
     Carriage return character (ASCII 13).

\t
     Tab character (ASCII 9).

\v
     Vertical tab character (ASCII 11).

\xHH
     Character code given by two hexadecimal digits.  For example \x7f
     for an ASCII DEL (127).

The following are examples of string literals:

     "foo"
     "bar plonk"
     "Hello World"
     "\"Hi\", he said."

   ---------- Footnotes ----------

   (1) Actually, the current implementation restricts strings to a
length of 2^24, or 16,777,216, characters.  Sorry.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]