IDLdoc


The previous article about IDLdoc showed how to get and run IDLdoc on your library without changing any of your code. Now, what if you are willing to add special tags to your comments for IDLdoc's use?

So here is just the header of the mg_n_smallest routine with a few of the most common tags in the comments:

;+
; Finds the n smallest elements of a data array. This algorithm works
; fastest on uniformly distributed data. The worst case for it is a
; single smallest data element and all other elements with another
; value. This will be nearly equivalent to just sorting all the
; elements and choosing the first n elements.
;
; @returns index array
;
; @param data {in}{required}{type=numeric array} data array of any
;        numeric type (except complex/dcomplex)
; @param n {in}{required}{type=integer} number of smallest elements
;        to find
; @keyword largest {in}{optional}{type=boolean} set to find n largest
;          elements
;-
function mg_n_smallest, data, n, largest=largest

These comments produce this output.

There are other tags to document authors, history of the code, copyright, assumptions, category the code addresses, etc. For a complete list of the tags allowed in IDLdoc 2.0, see the developer's help page (produced by IDLdoc when it runs and also included in the distribution of IDLdoc in the "docs" directory).

Next, I'll talk about customizing the overview pages and then on to some of the more advanced features.

IDLdoc is a tool to generate documentation for IDL code. The generated documentation has been traditionally been HTML web pages, but with IDLdoc 2.0 the documentation can easily be capatible with the IDL Assistant or (with a bit more work) any text file type such as LaTeX, XML, Docbook, etc. Examples of IDLdoc output are my published library and demos. Special comments understood by IDLdoc can document specific characteristics of your code, but IDLdoc can produce (at least somewhat) useful output of nearly any IDL code.

Continue reading "How to document your current library with IDLdoc 2.0."

« Previous Page