File: make_002dinstance.html

package info (click to toggle)
gcl 2.6.14-21
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 60,864 kB
  • sloc: ansic: 177,407; lisp: 151,509; asm: 128,169; sh: 22,510; cpp: 11,923; tcl: 3,181; perl: 2,930; makefile: 2,360; sed: 334; yacc: 226; lex: 95; awk: 30; fortran: 24; csh: 23
file content (101 lines) | stat: -rw-r--r-- 4,482 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>make-instance (ANSI and GNU Common Lisp Document)</title>

<meta name="description" content="make-instance (ANSI and GNU Common Lisp Document)">
<meta name="keywords" content="make-instance (ANSI and GNU Common Lisp Document)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html" rel="start" title="Top">
<link href="Objects-Dictionary.html" rel="up" title="Objects Dictionary">
<link href="make_002dinstances_002dobsolete.html" rel="next" title="make-instances-obsolete">
<link href="remove_002dmethod.html" rel="prev" title="remove-method">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<span id="make_002dinstance"></span><div class="header">
<p>
Next: <a href="make_002dinstances_002dobsolete.html" accesskey="n" rel="next">make-instances-obsolete</a>, Previous: <a href="remove_002dmethod.html" accesskey="p" rel="prev">remove-method</a>, Up: <a href="Objects-Dictionary.html" accesskey="u" rel="up">Objects Dictionary</a> &nbsp; </p>
</div>
<hr>
<span id="make_002dinstance-_005bStandard-Generic-Function_005d"></span><h4 class="subsection">7.7.19 make-instance                                   [Standard Generic Function]</h4>

<span id="Syntax_003a_003a-24"></span><h4 class="subsubheading">Syntax::</h4>

<p><code>make-instance</code>  <i>class <span class="roman">&amp;rest</span> initargs <span class="roman">&amp;key</span> <span class="roman">&amp;allow-other-keys</span></i> &rArr;  <i>instance</i>
</p>
<span id="Method-Signatures_003a_003a-13"></span><h4 class="subsubheading">Method Signatures::</h4>

<p><code>make-instance</code>  <i><span class="roman">(</span><i>class</i> <b>standard-class</b><span class="roman">)</span> <span class="roman">&amp;rest</span> initargs</i>
</p>
<p><code>make-instance</code>  <i><span class="roman">(</span><i>class</i> <b>symbol</b><span class="roman">)</span> <span class="roman">&amp;rest</span> initargs</i>
</p>
<span id="Arguments-and-Values_003a_003a-107"></span><h4 class="subsubheading">Arguments and Values::</h4>

<p><i>class</i>&mdash;a <i>class</i>,
	     or a <i>symbol</i> that names a <i>class</i>.
</p>
<p><i>initargs</i>&mdash;an <i>initialization argument list</i>.
</p>
<p><i>instance</i>&mdash;a <i>fresh</i> <i>instance</i> of <i>class</i> <i>class</i>.
</p>
<span id="Description_003a_003a-146"></span><h4 class="subsubheading">Description::</h4>

<p>The <i>generic function</i> <b>make-instance</b> 
creates and returns a new <i>instance</i> of the given <i>class</i>.
</p>
<p>If the second of the above <i>methods</i> is selected, 
that <i>method</i> invokes <b>make-instance</b> on the arguments
<tt>(find-class <i>class</i>)</tt> and <i>initargs</i>.
</p>
<p>The initialization arguments are checked within <b>make-instance</b>.
</p>
<p>The <i>generic function</i> <b>make-instance</b> 
may be used as described in <a href="Object-Creation-and-Initialization.html">Object Creation and Initialization</a>.
</p>
<span id="Exceptional-Situations_003a_003a-33"></span><h4 class="subsubheading">Exceptional Situations::</h4>

<p>If any of the initialization arguments has not
been declared as valid, an error of <i>type</i> <b>error</b> is signaled.
</p>
<span id="See-Also_003a_003a-128"></span><h4 class="subsubheading">See Also::</h4>

<p><a href="defclass.html">defclass</a>
,
<a href="class_002dof.html">class-of</a>
,
<a href="allocate_002dinstance.html">allocate-instance</a>
,
<a href="Initialize_002dInstance.html">Initialize-Instance</a>
,
<a href="Object-Creation-and-Initialization.html">Object Creation and Initialization</a>
</p>



</body>
</html>