Natural Docs

From Wikipedia, the free encyclopedia

Natural Docs
Image:Natural-Docs-Logo.png
Author: Greg Valure
Latest release: 1.35 / March 20, 2005
Preview release: Feb 10th / February 10, 2007
OS: Cross-platform
Use: Documentation generator
License: GNU General Public License
Website: NaturalDocs.org

Natural Docs is a multi-language documentation generator. It is written in Perl and is available as free software under the terms of the GNU General Public License. It attempts to keep the comments written in source code just as readable as the generated documentation. It is written and maintained by Greg Valure.

Theoretically, it can generate documentation from any language that can support comments, or from plain text files. When executed, it can automatically document functions, variables, classes, and inheritance from ActionScript 2.0, C#, and Perl regardless of existing documentation in the source code. In all other languages, these need to be explicitly documented for them to be generated. It can generate documentation in HTML, either with frames or without.

Unlike Javadoc, it is not considered an industry standard for documenting in any language, although Javadoc compatibility is being developed for certain languages.[1] It is used by some hobbyists and companies, such as CNET Networks, Inc. and Iron Realms Entertainment.[2][3] It has gained popularity amongst ActionScript 2.0 developers because no other free documentation generator exists that fully supports ActionScript 2.0 and because it generates higher-quality output than similar generators that partially support the language, such as ROBODoc.

Contents

[edit] Example

This is an example of the documentation style:

/*
 * Function: Multiply
 * 
 * Multiplies two integers.
 *
 * Parameters:
 *    x - The first integer.
 *    y - The second integer.
 *
 * Returns:
 *    The two integers multiplied together.
 *
 * See Also:
 *    <Divide>
 */

int Multiply (int x, int y)
   {  return x * y;  };

For comparison, this is how the same thing would be documented with Javadoc:

/**         
 * Multiplies two integers.      
 *       
 * @param x The first integer.   
 * @param y The second integer.          
 * @return The two integers multiplied together.         
 * @see Divide   
 */      

int Multiply (int x, int y)      
   { return x * y; };

[edit] See also

[edit] Notes and references

[edit] Further reading