Next: , Previous: Basic Rules, Up: Documenting Your Code


3.2 Minimal Documentation File

The minimal documentation file would look something like this:

     Example: Minimal documentation file  
      1  Package: MyPkg
      2
      3  Module: MyUnit
      4
      5  End Module: MyUnit
      6
      7  End Package: MyPkg

Lines starting by a header name immediately followed by a colon (like lines 1, 3, 5, 7) are called header lines. You'll use a header line for each element you want to document. There are many header names, more than 60, but only a few (see Core Headers) are necessary to write documentation all others are just synonyms. Even better, you can start writing real documentation with only 10 headers and, you already know four of them: Package, End Package, Module, and End Module.

Important: A header is recognized only if there is no space between it and the colon. If a space is present the line is considered as a simple text.

The minimal documentation file consists of a package block that contains a module block. The package block starts by a Package header (line 1) and ends by a End Package header (line 7). The module block starts by a Module header (line 3) and ends by a End Module header (line 5).

For now this file documents nothing but it is syntactically correct. We could even make it shorter by removing the last two lines since the End Package and End Module headers are optional. However, some error messages are sometimes easier to understand if they are present.

For a complete list of all header names see Headers.

Note: The idea of using headers comes from Natural Docs 1 and to a lesser extent from ROBODoc 2.

Footnotes

[1] http://www.naturaldocs.org/

[2] http://rfsber.home.xs4all.nl/Robo/