| 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>The "Method Signature" Section of a Dictionary Entry (ANSI and GNU Common Lisp Document)</title> |
| 7 |
|
| 8 |
<meta name="description" content="The "Method Signature" Section of a Dictionary Entry (ANSI and GNU Common Lisp Document)"> |
| 9 |
<meta name="keywords" content="The "Method Signature" Section of a Dictionary Entry (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="Interpreting-Dictionary-Entries.html" rel="up" title="Interpreting Dictionary Entries"> |
| 15 |
<link href="The-_0022Name_0022-Section-of-a-Dictionary-Entry.html" rel="next" title="The "Name" Section of a Dictionary Entry"> |
| 16 |
<link href="The-_0022Argument-Precedence-Order_0022-Section-of-a-Dictionary-Entry.html" rel="prev" title="The "Argument Precedence Order" Section of a Dictionary Entry"> |
| 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="The-_0022Method-Signature_0022-Section-of-a-Dictionary-Entry"></span><div class="header"> |
| 41 |
<p> |
| 42 |
Next: <a href="The-_0022Name_0022-Section-of-a-Dictionary-Entry.html" accesskey="n" rel="next">The "Name" Section of a Dictionary Entry</a>, Previous: <a href="The-_0022Argument-Precedence-Order_0022-Section-of-a-Dictionary-Entry.html" accesskey="p" rel="prev">The "Argument Precedence Order" Section of a Dictionary Entry</a>, Up: <a href="Interpreting-Dictionary-Entries.html" accesskey="u" rel="up">Interpreting Dictionary Entries</a> </p> |
| 43 |
</div> |
| 44 |
<hr> |
| 45 |
<span id="The-_0022Method-Signature_0022-Section-of-a-Dictionary-Entry-1"></span><h4 class="subsubsection">1.4.4.17 The "Method Signature" Section of a Dictionary Entry</h4> |
| 46 |
|
| 47 |
<p>The description of a <i>generic function</i> includes descriptions of the |
| 48 |
<i>methods</i> that are defined on that <i>generic function</i> by the standard. |
| 49 |
A method signature is used to describe the <i>parameters</i> and |
| 50 |
<i>parameter specializers</i> for each <i>method</i>. |
| 51 |
<i>Methods</i> defined for the <i>generic function</i> must be of the form described |
| 52 |
by the <i>method</i> <i>signature</i>. |
| 53 |
</p> |
| 54 |
<p><code>F</code> <i><span class="roman">(</span><i>x</i> <i>class</i><span class="roman">)</span> |
| 55 |
<span class="roman">(</span><i>y</i> t<span class="roman">)</span> |
| 56 |
<span class="roman">&optional</span> <i>z</i> <span class="roman">&key</span> <i>k</i></i> |
| 57 |
</p> |
| 58 |
<p>This <i>signature</i> indicates that this method on the <i>generic function</i> |
| 59 |
<b>F</b> has two <i>required parameters</i>: |
| 60 |
<i>x</i>, which must be a <i>generalized instance</i> of the <i>class</i> <i>class</i>; |
| 61 |
and <i>y</i>, which can be any <i>object</i> |
| 62 |
(<i>i.e.</i>, a <i>generalized instance</i> of the <i>class</i> <b>t</b>). |
| 63 |
In addition, there is an <i>optional parameter</i> <i>z</i> and a |
| 64 |
<i>keyword parameter</i> <i>k</i>. This <i>signature</i> also indicates that this |
| 65 |
method on <tt>F</tt> is a <i>primary method</i> and has no <i>qualifiers</i>. |
| 66 |
</p> |
| 67 |
<p>For each <i>parameter</i>, the <i>argument</i> supplied must be in the |
| 68 |
intersection of the <i>type</i> specified in the description of the |
| 69 |
corresponding <i>generic function</i> and the <i>type</i> given in |
| 70 |
the <i>signature</i> of some <i>method</i> (including not only those |
| 71 |
<i>methods</i> defined in this specification, but also |
| 72 |
<i>implementation-defined</i> or user-defined <i>methods</i> in situations |
| 73 |
where the definition of such <i>methods</i> is permitted). |
| 74 |
</p> |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
</body> |
| 79 |
</html> |