Documenting Your Code

Walkthrough

- Our First Function
- Classes and Scope
- More Formatting
- More on Linking
- Extra Documentation
- Abbreviated Syntax

Reference

- Comments
- Text Files
- Keywords, Topics, and Scope
- Linking
- Formatting and Layout
- Page Titles
- Summaries
- Javadoc Compatibility

Here’s a quick example of how to document your code for Natural Docs. If you’re a new user, we have a walkthrough to get you started. Otherwise, visit the reference for the full details.

    /*
       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;  };

| Copyright © 2003-2010 Greg Valure