unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* doc string syntax
@ 2004-07-18 23:16 Kevin Ryde
  0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2004-07-18 23:16 UTC (permalink / raw)


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.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-18 23:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-18 23:16 doc string syntax Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).