Standard Library procedure that extracts headerdocumentation for user-written procedures and functions.
File (OpenVMS only) If present and nonzero, sends the output to the file
userlib.doc
in the current directory.Multi (UNIX only) A flag that allows for the printing of more than one file. To do this, Multi must be nonzero and the named file must exist in more than one directory in the path.
Path (OpenVMS only) The directory/library search path. It has the same format and semantics as the system variable !Path. If this keyword is omitted, !Path is used.
Print A flag to direct the output:
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='cat gamma_header'
DOC_LIBRARY, '*',directory= $ '$VNI_DIR/wave/lib/std', $ Print='cat user_lib_headers'
DOC_LIBRARY, 'gamma'
DOC_LIBRARY, 'gamma', /File