VocalEasel/mma/docs/html/ref/node22.html

179 lines
5.0 KiB
HTML
Raw Normal View History

2006-11-10 08:07:56 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Documentation Strings</TITLE>
<META NAME="description" CONTENT="Documentation Strings">
<META NAME="keywords" CONTENT="mma">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="mma.css">
<LINK REL="next" HREF="node23.html">
<LINK REL="previous" HREF="node21.html">
<LINK REL="up" HREF="mma.html">
<LINK REL="next" HREF="node23.html">
</HEAD>
<BODY bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html672"
HREF="node23.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html670"
HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html664"
HREF="node21.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html673"
HREF="node23.html">Paths, Files and Libraries</A>
<B> Up:</B> <A NAME="tex2html671"
HREF="mma.html">Reference Manual</A>
<B> Previous:</B> <A NAME="tex2html665"
HREF="node21.html">Begin/End Blocks</A>
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL>
<LI><A NAME="tex2html674"
HREF="node22.html#SECTION002210000000000000000">Doc</A>
<LI><A NAME="tex2html675"
HREF="node22.html#SECTION002220000000000000000">Author</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<H1><A NAME="SECTION002200000000000000000">
Documentation Strings</A>
</H1>
<P>
It has been mentioned a few times already the importance of clearly
documenting your files and library files. For the most part, you can
use comments in your files; but in library files you use the
D<SMALL>OC</SMALL> directive.
<P>
In addition to the commands listed in this chapter, you should also
note <A HREF="node6.html#sec-grooves">D<SMALL>EF</SMALL>G<SMALL>ROOVES</SMALL></A>).
<P>
For some real-life examples of how to document your library files,
look at any of the library files supplied with this distribution.
<P>
<H1><A NAME="SECTION002210000000000000000"></A> <A NAME="sec-docs"></A>
<BR>
Doc
</H1>
<P>
A D<SMALL>OC</SMALL> command is pretty simple:
<P>
<TABLE ALIGN="CENTER" CELLSPACING=0 CELLPADDING=5 BGCOLOR="OldLace" BORDER=3>
<TR> <TD>
<BLOCKQUOTE><B>Doc This is a documentation string! </B></BLOCKQUOTE>
</TD></TR></TABLE>
<P>
In most cases, D<SMALL>OC</SMALL>s are treated as C<SMALL>OMMENT</SMALL>s. However,
if the <I>-Dx</I><A NAME="tex2html68"
HREF="#foot11348"><SUP>22.1</SUP></A> option is given
on the command line, D<SMALL>OC</SMALL>s are processed and printed to standard
output.
<P>
For producing the <I>
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> Standard Library Reference</I> a trivial
Python program is used to collate the output generated with a command
like:
<P>
<TABLE ALIGN="CENTER" CELLSPACING=0 CELLPADDING=5 BGCOLOR="OldLace" BORDER=3>
<TR> <TD>
<BLOCKQUOTE><B>$ mma -Dx -w /usr/local/lib/mma/swing </B></BLOCKQUOTE>
</TD></TR></TABLE>
<P>
Note, the '-w' option has been used to suppress the printing of warning
messages.
<P>
<H1><A NAME="SECTION002220000000000000000">
Author</A>
</H1>
<P>
As part of the documentation package, there is a A<SMALL>UTHOR</SMALL>
command:
<P>
<TABLE ALIGN="CENTER" CELLSPACING=0 CELLPADDING=5 BGCOLOR="OldLace" BORDER=3>
<TR> <TD>
<BLOCKQUOTE><B>Author Bob van der Poel </B></BLOCKQUOTE>
</TD></TR></TABLE>
<P>
Currently A<SMALL>UTHOR</SMALL> lines are processed and the data is saved, but
never used. It may be used in a future library documentation
procedures, so you should use it in any library files you write.
<BR><HR><H4>Footnotes</H4>
<DL>
<DT><A NAME="foot11348">...-Dx</A><A
HREF="node22.html#tex2html68"><SUP>22.1</SUP></A></DT>
<DD>See the <A HREF="node2.html#cmd-summary">command
summary</A>.
</DD>
</DL><HR>
<!--Navigation Panel-->
<A NAME="tex2html672"
HREF="node23.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html670"
HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html664"
HREF="node21.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html673"
HREF="node23.html">Paths, Files and Libraries</A>
<B> Up:</B> <A NAME="tex2html671"
HREF="mma.html">Reference Manual</A>
<B> Previous:</B> <A NAME="tex2html665"
HREF="node21.html">Begin/End Blocks</A>
<!--End of Navigation Panel-->
<ADDRESS>
Bob
2006-10-15
</ADDRESS>
</BODY>
</HTML>