Routines (alphabetical) > Routines: R > ROUTINE_INFO

# ROUTINE_INFO

The ROUTINE_INFO function provides information about currently-compiled procedures and functions.

## Examples

To see information on all currently compiled routines:

myResult = ROUTINE_INFO( /SOURCE, /FUNCTIONS)

PRINT, myResult

## Syntax

Result = ROUTINE_INFO( [Routine] [, /PARAMETERS] [, /SOURCE ] [, /UNRESOLVED] [, /VARIABLES] [, /SYSTEM] [, /DISABLED] [, /ENABLED] [, /FUNCTIONS] )

## Return Value

Returns a string array consisting of the names of defined procedures or functions, or of parameters or variables used by a single procedure or function.

## Arguments

### Routine

A scalar string containing the name of routine for which information will be returned. Routine can be either a procedure or a function. If Routine is not supplied, ROUTINE_INFO returns a list of all currently-compiled procedures.

## Keywords

### DISABLED

Set this keyword to get the names of currently disabled system procedures or functions (in conjunction with the FUNCTIONS keyword). Use of DISABLED implies use of the SYSTEM keyword, since user routines cannot be disabled.

### ENABLED

Set this keyword to get the names of currently enabled system procedures or functions (in conjunction with the FUNCTIONS keyword). Use of ENABLED implies use of the SYSTEM keyword, since user routines cannot be disabled.

### FUNCTIONS

Set this keyword to return a string array containing currently-compiled functions. By default, ROUTINE_INFO returns a list of compiled procedures. If the SYSTEM keyword is also set, ROUTINE_INFO returns a list of all IDL built-in internal functions.

### PARAMETERS

Set this keyword to return an anonymous structure with the following fields:

- NUM_ARGS — An integer containing the number of positional parameters used in Routine.
- NUM_KW_ARGS — An integer containing the number of keyword parameters used in Routine.
- ARGS — A string array containing the names of the positional parameters used in Routine.
- KW_ARGS — A string array containing the names of the keyword parameters used in Routine.

You must supply the Routine argument when using this keyword. If Routine is a function, you must specify the FUNCTIONS keyword as well. Note that specifying the SYSTEM keyword along with this keyword will generate an error.

If Routine does not take any arguments, the ARGS field is not included in the anonymous structure. Similarly, if Routine does not take any keywords, the KW_ARGS field is not included.

### SOURCE

Set this keyword to return an array of anonymous structures with the following fields:

- NAME — A string containing the name of the procedure or function.
- PATH — A string containing the full path specification of the file that contains the definition of the procedure or function.

If Routine is specified, information for the specified procedure is returned. If Routine is not specified, information for all compiled procedures is returned. If the FUNCTIONS keyword is also set, ROUTINE_INFO returns information for the specified function or for all compiled functions.

If a routine is unresolved or its path information is unavailable, the PATH field will contain an empty string. If a routine has been SAVEd and then RESTOREd, the PATH field will contain the path to the SAVE file.

Note: Specifying the SYSTEM keyword along with this keyword will generate an error.

### SYSTEM

Set this keyword to return a string array listing all IDL built-in internal procedures. Built-in internal procedures are part of the IDL executable, and are not written in the IDL language. If the FUNCTIONS keyword is also set, ROUTINE_INFO returns a list of all IDL built-in internal functions.

### UNRESOLVED

Set this keyword to return a string array listing procedures that are referenced in any currently-compiled procedure or function, but which are themselves not yet compiled. If the FUNCTIONS keyword is also set, ROUTINE_INFO returns a list of functions that are referenced but not yet compiled.

Note that specifying the SYSTEM keyword along with this keyword will generate an error.

### VARIABLES

Set this keyword to return a string array listing variables defined in the procedure. If the FUNCTIONS keyword is also set, ROUTINE_INFO returns a string array listing variables defined in the function.

You must supply the Routine argument when using this keyword. Note that specifying the SYSTEM keyword along with this keyword will generate an error.

## Version History

5.0 | Introduced

## See Also

RESOLVE_ALL, RESOLVE_ROUTINE