Standard Library procedure that extracts headerdocumentation for user-written procedures and functions.
File
userlib.doc
in the current directory.Multi
Path
DOC_LIBRARY is a useful tool for finding out what is available in the undocumented Users' Library. This procedure can be used to search each routine in the Users' Library and extract all the text that is bracketed by the + and the - characters. This includes the routine's name, purpose, category, calling sequence, inputs, outputs, and modification history.
DOC_LIBRARY checks to see what operating system you are using, and then calls the appropriate version DOC_LIB_UNIX or DOC_LIB_VMS.
Keywords allow you to have the output sent to a printer or displayed on the screen. If the procedure is called without keywords, you are prompted for specific information about the search.
When creating your own PV-WAVE routines, it is helpful to include a ; + as the second line in the file and a ; - as the last informational line so that DOC_LIBRARY can then be used to create documentation for the routine. An example of a file set up to use DOC_LIBRARY in this way is shown below. (All the information shown in bold will be extracted by DOC_LIBRARY.)
FUNCTION COSINES, x, m ;+ ; NAME: ; COSINES ; PURPOSE: ; Example of a function to be used by SVDFIT. ; ; Returns COS(i*COS(x(j)). ; CATEGORY: ; Curve fitting. ; CALLING SEQUENCE: ; r = COSINES(x, m) ; INPUTS: ; x = vector of data values. n elements. ; m = order, or number of terms. ; OUTPUTS: ; Function result = (n,m) array, ; where n is the number of points in x, ; and m is the order. r(i,j) = COS(j * x(i)) ; MODIFICATION HISTORY: ; DMS, Nov, 1987. ;- ON_ERROR, 2 ;Return to caller if an error occurs. RETURN, COS(x # FINDGEN(m)) ;Couldn't be much simpler. END
DOC_LIBRARY, 'gamma'
DOC_LIBRARY, 'gamma', Print='catgamma_header'
DOC_LIBRARY, '*',directory= $ '$VNI_DIR/wave/lib/std', $ Print='catuser_lib_headers'
DOC_LIBRARY, 'gamma'
DOC_LIBRARY, 'gamma', /File