Question: Documenting variables.

Having been trained as a computer programmer, particularly in an Object-Oriented orientation, my inclination when declaring a variable is to add a line of documentation to it.  In C++, Java and other ASCII based programming languages this is oftern done with JavaDoc, Doxygen and other notational sytax in the comments.  For example:

/**
 * The number of widgets.
 */
int num_widgets;

Although the documentation is not carried along as part of the declaration in the machine code it is available for code parsers to find and catalog from the source code text.

When working in Maple document mode I can use a similar convention and simply add documentation for a variable in text above math mode.  Is there a more formal convention or expression I could use to indicate that I am adding documentation to a variable?  Ideally there would be some tool that would allow me to query the catalog of declared variables and their comments for a given scope.

Please Wait...