We've 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 we suggest you use the Doc directive.
In addition to the commands listed in this chapter, you should also note the DefGroove section ().
For some real-life examples of how to document your library files, look at any of the library files supplied with this distribution.
A Doc command is pretty simple:
Doc This is a documentation string! |
In most cases, Docs are treated as Comments. However, if the -Dx19.1 option is given on the command line, Docs are processed and printed to standard output.
For producing the MMA Standard Library Reference a trivial Python program is used to collate the output generated with a command like:
mma -Dx -w /usr/local/lib/mma/swing |
Note, we added the '-w' option to suppress the printing of warning messages.
As part of the documentation package, there is a Author command:
Author Bob van der Poel |
Currently Author 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 your write.