next up previous
Next: Paths, Files and Libraries Up: Reference Manaul Previous: Begin/End Blocks

Subsections

Documentation Strings

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.


Doc

A Doc command is pretty simple:

Doc This is a documentation string!

In most cases, Docs are treated as Comments. However, if the -Dx18.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.

Author

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.



Footnotes

...-Dx18.1
See the command summary ([*]).

next up previous
Next: Paths, Files and Libraries Up: Reference Manaul Previous: Begin/End Blocks
2004-07-25