77 lines
4.4 KiB
HTML
77 lines
4.4 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>25.2. Documentation</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value=" Documentation">
|
|
<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=tex2html4420 HREF="node230.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html4418 HREF="node223.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html4412 HREF="node228.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html4422 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html4423 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html4421 HREF="node230.html"> Debugging Tools</A>
|
|
<B>Up:</B> <A NAME=tex2html4419 HREF="node223.html"> Miscellaneous Features</A>
|
|
<B> Previous:</B> <A NAME=tex2html4413 HREF="node228.html"> Similarity of Constants</A>
|
|
<HR> <P>
|
|
<H1><A NAME=SECTION002920000000000000000>25.2. Documentation</A></H1>
|
|
<P>
|
|
<img align=bottom alt="old_change_begin" src="gif/old_change_begin.gif"><br>
|
|
<A NAME=DOCUMENTATIONSECTION>A</A>
|
|
simple facility is provided for attaching strings to
|
|
symbols for the purpose of on-line documentation.
|
|
Rather than using the property list of the symbol,
|
|
a separate function <tt>documentation</tt> is provided
|
|
so that implementations can optimize the storage of
|
|
documentation strings.
|
|
<P>
|
|
<BR><b>[Function]</b><BR>
|
|
<tt>documentation <i>symbol</i> <i>doc-type</i></tt><P>This function returns the documentation string of type <i>doc-type</i>
|
|
for the <i>symbol</i>, or <tt>nil</tt> if none exists. Both arguments must be symbols.
|
|
Some kinds of documentation are provided automatically by certain
|
|
Common Lisp constructs if the user writes an optional documentation string within
|
|
them:
|
|
<pre>
|
|
Construct Documentation Type
|
|
============================================
|
|
defvar variable
|
|
defparameter variable
|
|
defconstant variable
|
|
defun function
|
|
defmacro function
|
|
defstruct structure
|
|
deftype type
|
|
defsetf setf
|
|
============================================
|
|
</pre>
|
|
In addition, names of special forms may also have <tt>function</tt> documentation.
|
|
(Macros and special forms are not really functions, of course, but it is
|
|
convenient to group them with functions for documentation purposes.)
|
|
<P>
|
|
<tt>setf</tt> may be used with <tt>documentation</tt> to update
|
|
documentation information.
|
|
<br><img align=bottom alt="old_change_end" src="gif/old_change_end.gif">
|
|
<P>
|
|
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
|
|
X3J13 voted in June 1988 (CLOS) <A NAME=28875> </A> to make <tt>documentation</tt>
|
|
a CLOS generic function (see chapter <A HREF="node260.html#CLOS">28</A>).
|
|
<P>
|
|
X3J13 voted in March 1989 (FUNCTION-NAME) <A NAME=28880> </A> to extend <tt>documentation</tt>
|
|
to accept any function-name (a symbol or a list
|
|
whose <i>car</i> is <tt>setf</tt> - see section <A HREF="node77.html#FUNCTIONNAMESECTION">7.1</A>).
|
|
Thus one may write <tt>(documentation '(setf cadr) 'function)</tt>
|
|
to determine whether there is any documentation for a <tt>setf</tt>
|
|
expansion function for <tt>cadr</tt>.
|
|
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html4420 HREF="node230.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html4418 HREF="node223.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html4412 HREF="node228.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html4422 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html4423 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html4421 HREF="node230.html"> Debugging Tools</A>
|
|
<B>Up:</B> <A NAME=tex2html4419 HREF="node223.html"> Miscellaneous Features</A>
|
|
<B> Previous:</B> <A NAME=tex2html4413 HREF="node228.html"> Similarity of Constants</A>
|
|
<HR> <P>
|
|
<HR>
|
|
<P><ADDRESS>
|
|
AI.Repository@cs.cmu.edu
|
|
</ADDRESS>
|
|
</BODY>
|