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

55 lines
3.3 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>19. Structures</TITLE>
</HEAD>
<BODY>
<meta name="description" value=" Structures">
<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=tex2html3620 HREF="node169.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html3618 HREF="clm.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html3612 HREF="node167.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html3622 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html3623 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3621 HREF="node169.html"> Introduction to Structures</A>
<B>Up:</B> <A NAME=tex2html3619 HREF="clm.html">Common Lisp the Language</A>
<B> Previous:</B> <A NAME=tex2html3613 HREF="node167.html"> String Construction and </A>
<HR> <P>
<H1><A NAME=SECTION002300000000000000000>19. Structures</A></H1>
<P>
Common Lisp provides a facility for creating named record structures
with named components. In effect, the user can define a new data type;
every data structure of that type has components with specified names.
Constructor, access, and assignment constructs are automatically
defined when the data type is defined.
<P>
This chapter is divided into two parts. The first part discusses
the basics of the structure facility, which is very simple and allows
the user to take advantage of the type-checking, modularity, and
convenience of user-defined record data types. The second part,
beginning with section <A HREF="node173.html#DefstructHairyStuff">19.5</A>,
discusses a number of specialized features of the facility that
have advanced applications. These features are completely optional,
and you needn't even know they exist in order to take
advantage of the basics.
<P>
<HR>
<UL>
<LI> <A NAME=tex2html3624 HREF="node169.html#SECTION002310000000000000000"> Introduction to Structures</A>
<LI> <A NAME=tex2html3625 HREF="node170.html#SECTION002320000000000000000"> How to Use Defstruct</A>
<LI> <A NAME=tex2html3626 HREF="node171.html#SECTION002330000000000000000"> Using the Automatically Defined Constructor Function</A>
<LI> <A NAME=tex2html3627 HREF="node172.html#SECTION002340000000000000000"> Defstruct Slot-Options</A>
<LI> <A NAME=tex2html3628 HREF="node173.html#SECTION002350000000000000000"> Defstruct Options</A>
<LI> <A NAME=tex2html3629 HREF="node174.html#SECTION002360000000000000000"> By-Position Constructor Functions</A>
<LI> <A NAME=tex2html3630 HREF="node175.html#SECTION002370000000000000000"> Structures of Explicitly Specified Representational Type</A>
<UL>
<LI> <A NAME=tex2html3631 HREF="node176.html#SECTION002371000000000000000"> Unnamed Structures</A>
<LI> <A NAME=tex2html3632 HREF="node177.html#SECTION002372000000000000000"> Named Structures</A>
<LI> <A NAME=tex2html3633 HREF="node178.html#SECTION002373000000000000000"> Other Aspects of Explicitly Specified Structures</A>
</UL>
</UL>
<HR>
<P><ADDRESS>
AI.Repository@cs.cmu.edu
</ADDRESS>
</BODY>