39 lines
2.1 KiB
HTML
39 lines
2.1 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>28.1.2.2. Creating Instances of Classes</TITLE>
|
||
|
</HEAD>
|
||
|
<BODY>
|
||
|
<meta name="description" value=" Creating Instances of Classes">
|
||
|
<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=tex2html4974 HREF="node266.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html4972 HREF="node263.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html4966 HREF="node264.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html4976 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html4977 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
||
|
<B> Next:</B> <A NAME=tex2html4975 HREF="node266.html"> Slots</A>
|
||
|
<B>Up:</B> <A NAME=tex2html4973 HREF="node263.html"> Classes</A>
|
||
|
<B> Previous:</B> <A NAME=tex2html4967 HREF="node264.html"> Defining Classes</A>
|
||
|
<HR> <P>
|
||
|
<H3><A NAME=SECTION003212200000000000000>28.1.2.2. Creating Instances of Classes</A></H3>
|
||
|
<P>
|
||
|
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
|
||
|
The generic function <tt>make-instance</tt> creates and returns a new
|
||
|
instance of a class. The Object System provides several mechanisms for
|
||
|
specifying how a new instance is to be initialized. For example, it
|
||
|
is possible to specify the initial values for slots in newly created
|
||
|
instances either by giving arguments to <tt>make-instance</tt> or by
|
||
|
providing default initial values.
|
||
|
<P>
|
||
|
Further initialization activities
|
||
|
can be performed by methods written for generic functions that are
|
||
|
part of the initialization protocol. The complete initialization
|
||
|
protocol is described in section <A HREF="node292.html#ObjectCreationandInitializationSECTION">28.1.9</A>.
|
||
|
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
|
||
|
<P>
|
||
|
<HR>
|
||
|
<P><ADDRESS>
|
||
|
AI.Repository@cs.cmu.edu
|
||
|
</ADDRESS>
|
||
|
</BODY>
|