mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-23 03:34:00 +00:00
229 lines
6.4 KiB
HTML
229 lines
6.4 KiB
HTML
<!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="node24.html">
|
|
<LINK REL="previous" HREF="node22.html">
|
|
<LINK REL="up" HREF="mma.html">
|
|
<LINK REL="next" HREF="node24.html">
|
|
</HEAD>
|
|
|
|
<BODY bgcolor="#ffffff">
|
|
<!--Navigation Panel-->
|
|
<A NAME="tex2html695"
|
|
HREF="node24.html">
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
|
|
<A NAME="tex2html693"
|
|
HREF="mma.html">
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
|
|
<A NAME="tex2html687"
|
|
HREF="node22.html">
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
|
|
<BR>
|
|
<B> Next:</B> <A NAME="tex2html696"
|
|
HREF="node24.html">Paths, Files and Libraries</A>
|
|
<B> Up:</B> <A NAME="tex2html694"
|
|
HREF="mma.html">Reference Manual</A>
|
|
<B> Previous:</B> <A NAME="tex2html688"
|
|
HREF="node22.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="tex2html697"
|
|
HREF="node23.html#SECTION002310000000000000000">Doc</A>
|
|
<LI><A NAME="tex2html698"
|
|
HREF="node23.html#SECTION002320000000000000000">Author</A>
|
|
<LI><A NAME="tex2html699"
|
|
HREF="node23.html#SECTION002330000000000000000">DocVar</A>
|
|
</UL>
|
|
<!--End of Table of Child-Links-->
|
|
<HR>
|
|
|
|
<H1><A NAME="SECTION002300000000000000000">
|
|
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="SECTION002310000000000000000"></A> <A NAME="sec-docs"></A>
|
|
<BR>
|
|
Doc
|
|
</H1>
|
|
|
|
<P>
|
|
A D<SMALL>OC</SMALL> command is pretty simple:
|
|
|
|
<P>
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
<tr><td>
|
|
<B>Doc This is a documentation string! </B>
|
|
|
|
</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="#foot10621"><SUP>23.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 Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
<tr><td>
|
|
<B>$ mma -Dxl -w /usr/local/lib/mma/swing </B>
|
|
|
|
</td></tr>
|
|
</Table>
|
|
|
|
<P>
|
|
Note, the '-w' option has been used to suppress the printing of warning
|
|
messages.
|
|
|
|
<P>
|
|
|
|
<H1><A NAME="SECTION002320000000000000000">
|
|
Author</A>
|
|
</H1>
|
|
|
|
<P>
|
|
As part of the documentation package, there is a A<SMALL>UTHOR</SMALL>
|
|
command:
|
|
|
|
<P>
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
<tr><td>
|
|
<B>Author Bob van der Poel </B>
|
|
|
|
</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.
|
|
|
|
<P>
|
|
|
|
<H1><A NAME="SECTION002330000000000000000">
|
|
DocVar</A>
|
|
</H1>
|
|
|
|
<P>
|
|
If any variables are used to change the behavior of a library file
|
|
they should be documented with a D<SMALL>OC</SMALL>V<SMALL>AR</SMALL> command. Normally these
|
|
lines are treated as comments, but when processing with the -Dxl or
|
|
-Dxh command line options the data is parsed and written to the output
|
|
documentation files.
|
|
|
|
<P>
|
|
Assuming that you are using the
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> variable $C<SMALL>HORD</SMALL>V<SMALL>OICE</SMALL> as
|
|
an optional voice setting in your file, you might have the following
|
|
in a library file:
|
|
|
|
<P>
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
<tr><td>
|
|
<B>Begin DocVar
|
|
<BR>
|
|
ChordVoice Voice used in Chord tracks (defaults to Piano2).
|
|
<BR>
|
|
End
|
|
<BR>
|
|
<BR>
|
|
If NDef ChordVoice
|
|
<BR>
|
|
Set ChordVoice Piano2
|
|
<BR>
|
|
Endif </B>
|
|
|
|
</td></tr>
|
|
</Table>
|
|
|
|
<P>
|
|
All variables used in the library file should be documented. You
|
|
should list the user variables first, and then any variables internal
|
|
to the library file. To double check to see what variables are used
|
|
you can add a S<SMALL>HOW</SMALL>V<SMALL>ARS</SMALL> to the end of the library file and
|
|
compile. Then document the variables and remove the S<SMALL>HOW</SMALL>V<SMALL>ARS</SMALL>.
|
|
|
|
<P>
|
|
<BR><HR><H4>Footnotes</H4>
|
|
<DL>
|
|
<DT><A NAME="foot10621">...-Dx</A><A
|
|
HREF="node23.html#tex2html68"><SUP>23.1</SUP></A></DT>
|
|
<DD>See the <A HREF="node2.html#cmd-summary">command
|
|
summary</A>.
|
|
|
|
</DD>
|
|
</DL><HR>
|
|
<!--Navigation Panel-->
|
|
<A NAME="tex2html695"
|
|
HREF="node24.html">
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
|
|
<A NAME="tex2html693"
|
|
HREF="mma.html">
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
|
|
<A NAME="tex2html687"
|
|
HREF="node22.html">
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
|
|
<BR>
|
|
<B> Next:</B> <A NAME="tex2html696"
|
|
HREF="node24.html">Paths, Files and Libraries</A>
|
|
<B> Up:</B> <A NAME="tex2html694"
|
|
HREF="mma.html">Reference Manual</A>
|
|
<B> Previous:</B> <A NAME="tex2html688"
|
|
HREF="node22.html">Begin/End Blocks</A>
|
|
<!--End of Navigation Panel-->
|
|
<ADDRESS>
|
|
bob
|
|
2007-03-07
|
|
</ADDRESS>
|
|
</BODY>
|
|
</HTML>
|