1
0
Fork 0
cl-sites/www.cs.cmu.edu/Groups/AI/html/cltl/clm/node107.html
2023-10-25 11:23:21 +02:00

76 lines
4 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>10. Symbols</TITLE>
</HEAD>
<BODY>
<meta name="description" value=" Symbols">
<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=tex2html2853 HREF="node108.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html2851 HREF="clm.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html2845 HREF="node106.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html2855 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html2856 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html2854 HREF="node108.html"> The Property List</A>
<B>Up:</B> <A NAME=tex2html2852 HREF="clm.html">Common Lisp the Language</A>
<B> Previous:</B> <A NAME=tex2html2846 HREF="node106.html"> Type Declaration for </A>
<HR> <P>
<H1><A NAME=SECTION001400000000000000000>10. Symbols</A></H1>
<P>
<A NAME=symbol>A</A>
Lisp symbol is a data object that has three user-visible
components:
<UL><LI>
The <i>property list</i> is a list that effectively provides each symbol
with many modifiable named components.
<P>
<LI>
The <i>print name</i> must be a string, which is the sequence of
characters used to identify the symbol. Symbols are of great use
because a symbol can be located once its name is given
(typed, say, on a keyboard).
One may ordinarily not alter a symbol's print name.
</UL>
<P>
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
X3J13 voted in March 1989 (CHARACTER-PROPOSAL) <A NAME=9782>&#160;</A>
to specify it is an error to alter a print name.
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
<P>
<UL><LI>
The <i>package cell</i> must refer to a package object.
A package is a data structure
used to locate a symbol once given the symbol's name.
A symbol is uniquely identified
by its name only when considered relative to a package. A symbol may
appear in many packages, but it can be <i>owned</i> by at most one package.
The package cell points to the owner, if any.
Package cells are discussed along with packages in chapter <A HREF="node111.html#XPACK">11</A>.
</UL>
<P>
A symbol may actually have other components for use by the
implementation. One of the more important uses of symbols is as
names for program variables; it is frequently desirable for the
implementor to use certain components of a symbol to implement
the semantics of variables. See <tt>symbol-value</tt>
and <tt>symbol-function</tt>.
However, there are several possible
implementation strategies, and so such possible components are not
described here.
<P>
<HR>
<UL>
<LI> <A NAME=tex2html2857 HREF="node108.html#SECTION001410000000000000000"> The Property List</A>
<LI> <A NAME=tex2html2858 HREF="node109.html#SECTION001420000000000000000"> The Print Name</A>
<LI> <A NAME=tex2html2859 HREF="node110.html#SECTION001430000000000000000"> Creating Symbols</A>
</UL>
<BR> <HR><A NAME=tex2html2853 HREF="node108.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html2851 HREF="clm.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html2845 HREF="node106.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html2855 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html2856 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html2854 HREF="node108.html"> The Property List</A>
<B>Up:</B> <A NAME=tex2html2852 HREF="clm.html">Common Lisp the Language</A>
<B> Previous:</B> <A NAME=tex2html2846 HREF="node106.html"> Type Declaration for </A>
<HR> <P>
<HR>
<P><ADDRESS>
AI.Repository@cs.cmu.edu
</ADDRESS>
</BODY>