emacs.d/clones/lisp/www.cs.cmu.edu/Groups/AI/html/cltl/clm/node57.html

41 lines
2.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 0.6.5 (Tue Nov 15 1994) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>5.1.1. Self-Evaluating Forms</TITLE>
</HEAD>
<BODY>
<meta name="description" value=" Self-Evaluating Forms">
<meta name="keywords" value="clm">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<b>Common Lisp the Language, 2nd Edition</b>
<BR> <HR><A NAME=tex2html2227 HREF="node58.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html2225 HREF="node56.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html2219 HREF="node56.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html2229 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html2230 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html2228 HREF="node58.html"> Variables</A>
<B>Up:</B> <A NAME=tex2html2226 HREF="node56.html"> Forms</A>
<B> Previous:</B> <A NAME=tex2html2220 HREF="node56.html"> Forms</A>
<HR> <P>
<H2><A NAME=SECTION00911000000000000000>5.1.1. Self-Evaluating Forms</A></H2>
<P>
All numbers, characters, strings, and bit-vectors
are <i>self-evaluating</i> forms.
When such an object is evaluated, that object
(or possibly a copy in the case of numbers or characters)
is returned as the value
of the form. The empty list <tt>()</tt>, which is also the false value <tt>nil</tt>,
is also a self-evaluating form: the value of <tt>nil</tt> is <tt>nil</tt>.
Keywords (symbols written with a leading colon) also evaluate
to themselves: the value of <tt>:start</tt> is <tt>:start</tt>.
<P>
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
X3J13 voted in January 1989 (CONSTANT-MODIFICATION) <A NAME=2982>&#160;</A> to clarify that
it is an error to destructively modify any object that appears as a constant
in executable code, whether as
a self-evaluating form or within a <tt>quote</tt> special form.
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
<P>
<HR>
<P><ADDRESS>
AI.Repository@cs.cmu.edu
</ADDRESS>
</BODY>