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

4.2 Literals

Special Form: quote datum

[R5RS] Evaluates to datum.

 
(quote x) ⇒ x
(quote (1 2 3)) ⇒ (1 2 3)
Reader Syntax: 'datum

[R5RS] Equivalent to (quote datum).

 
'x ⇒ x
'(1 2 3) ⇒ (1 2 3)

Note: R5RS says it is an error to alter the value of a literal expression. Gauche doesn't check constant-ness of pairs and vectors, and does not signal an error if you modify them using the destructive procedures such as set-car! and vector-set!. Doing so will cause unexpected results. Gauche does check constant-ness of strings, and signals an error if you try to alter a constant string.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Shiro Kawai on October, 7 2008 using texi2html 1.78.