Debian Codegraph @

info/gcl/add_002dmethod.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>add-method (ANSI and GNU Common Lisp Document)</title>
7
8 <meta name="description" content="add-method (ANSI and GNU Common Lisp Document)">
9 <meta name="keywords" content="add-method (ANSI and GNU Common Lisp Document)">
10 <meta name="resource-type" content="document">
11 <meta name="distribution" content="global">
12 <meta name="Generator" content="makeinfo">
13 <link href="index.html" rel="start" title="Top">
14 <link href="Objects-Dictionary.html" rel="up" title="Objects Dictionary">
15 <link href="initialize_002dinstance.html" rel="next" title="initialize-instance">
16 <link href="find_002dmethod.html" rel="prev" title="find-method">
17 <style type="text/css">
18 <!--
19 a.summary-letter {text-decoration: none}
20 blockquote.indentedblock {margin-right: 0em}
21 div.display {margin-left: 3.2em}
22 div.example {margin-left: 3.2em}
23 div.lisp {margin-left: 3.2em}
24 kbd {font-style: oblique}
25 pre.display {font-family: inherit}
26 pre.format {font-family: inherit}
27 pre.menu-comment {font-family: serif}
28 pre.menu-preformatted {font-family: serif}
29 span.nolinebreak {white-space: nowrap}
30 span.roman {font-family: initial; font-weight: normal}
31 span.sansserif {font-family: sans-serif; font-weight: normal}
32 ul.no-bullet {list-style: none}
33 -->
34 </style>
35
36
37 </head>
38
39 <body lang="en">
40 <span id="add_002dmethod"></span><div class="header">
41 <p>
42 Next: <a href="initialize_002dinstance.html" accesskey="n" rel="next">initialize-instance</a>, Previous: <a href="find_002dmethod.html" accesskey="p" rel="prev">find-method</a>, Up: <a href="Objects-Dictionary.html" accesskey="u" rel="up">Objects Dictionary</a> &nbsp; </p>
43 </div>
44 <hr>
45 <span id="add_002dmethod-_005bStandard-Generic-Function_005d"></span><h4 class="subsection">7.7.35 add-method [Standard Generic Function]</h4>
46
47 <span id="Syntax_003a_003a-32"></span><h4 class="subsubheading">Syntax::</h4>
48
49 <p><code>add-method</code> <i>generic-function method</i> &rArr; <i>generic-function</i>
50 </p>
51 <span id="Method-Signatures_003a_003a-18"></span><h4 class="subsubheading">Method Signatures::</h4>
52
53 <p><code>add-method</code> <i><span class="roman">(</span><i>generic-function</i> <b>standard-generic-function</b><span class="roman">)</span>
54 <span class="roman">(</span><i>method</i> <b>method</b><span class="roman">)</span></i>
55 </p>
56 <span id="Arguments-and-Values_003a_003a-123"></span><h4 class="subsubheading">Arguments and Values::</h4>
57
58 <p><i>generic-function</i>&mdash;a <i>generic function</i> <i>object</i>.
59 </p>
60 <p><i>method</i>&mdash;a <i>method</i> <i>object</i>.
61 </p>
62 <span id="Description_003a_003a-162"></span><h4 class="subsubheading">Description::</h4>
63
64 <p>The generic function <b>add-method</b> adds a <i>method</i>
65 to a <i>generic function</i>.
66 </p>
67 <p>If <i>method</i> agrees with an existing <i>method</i> of <i>generic-function</i>
68 on <i>parameter specializers</i> and <i>qualifiers</i>,
69 the existing <i>method</i> is replaced.
70 </p>
71 <span id="Exceptional-Situations_003a_003a-44"></span><h4 class="subsubheading">Exceptional Situations::</h4>
72
73 <p>The <i>lambda list</i> of the method function of <i>method</i> must be
74 congruent with the <i>lambda list</i> of <i>generic-function</i>,
75 or an error of <i>type</i> <b>error</b> is signaled.
76 </p>
77 <p>If <i>method</i> is a <i>method</i> <i>object</i> of
78 another <i>generic function</i>, an error of <i>type</i> <b>error</b> is signaled.
79 </p>
80 <span id="See-Also_003a_003a-144"></span><h4 class="subsubheading">See Also::</h4>
81
82 <p><a href="defmethod.html">defmethod</a>
83 ,
84 <a href="defgeneric.html">defgeneric</a>
85 ,
86 <a href="find_002dmethod.html">find-method</a>
87 ,
88 <a href="remove_002dmethod.html">remove-method</a>
89 ,
90 <a href="Agreement-on-Parameter-Specializers-and-Qualifiers.html">Agreement on Parameter Specializers and Qualifiers</a>
91 </p>
92
93
94
95 </body>
96 </html>