RESOLVE_ALL
The RESOLVE_ALL procedure iteratively resolves (by compiling) any uncompiled procedures or functions that are called in any already-compiled procedure or function. The process ends when there are no unresolved routines left to compile. If an unresolved procedure or function is not in the IDL search path, RESOLVE_ALL exits with an error, and no additional routines are compiled.
RESOLVE_ALL is primarily used to construct an IDL SAVE file containing the compiled code for a package of routines.
- If you are constructing such a SAVE file and it contains calls to built-in IDL system functions that are not present under all operating systems (e.g., IOCTL), you must make sure to use FORWARD_FUNCTION to tell IDL that these names are functions. Otherwise, IDL may interpret them as arrays and generate unintended results.
- If you are creating a SAVE file that relies on graphics or iTools components, RESOLVE_ALL automatically calls IRESOLVE if it finds any routines from IDL graphics or iTools.
- RESOLVE_ALL does not resolve procedures or functions that are called via quoted strings such as CALL_PROCEDURE, CALL_FUNCTION, or EXECUTE, or in keywords that can contain procedure names such as TICKFORMAT or EVENT_PRO. To include these routines in your SAVE file you should either use RESOLVE_ROUTINE or compile them manually.
- RESOLVE_ALL does not resolve widget event handler routines that are specified with any of the event handler keywords. In general, it is best to include the event handling routine in the same program file as the widget creation routine, so that all of the event handlers are compiled along with the creation routine.
- RESOLVE_ALL cannot resolve calls to LAMBDA functions or LAMBDAP procedures, and will throw an error with the name of the "unresolved" variable. If you have only a few Lambda variables, you can use the SKIP_ROUTINES keyword to ignore these variable names. Otherwise, you could use the CONTINUE_ON_ERROR and UNRESOLVED keywords to make sure that the list of unresolved routines matches your list of Lambda variable names.
This routine is written in the IDL language. Its source code can be found in the file resolve_all.pro
in the lib
subdirectory of the IDL distribution.
Syntax
RESOLVE_ALL [, CLASS=string] [, /CONTINUE_ON_ERROR] [, /QUIET] [, RESOLVE_EITHER=string] [, RESOLVE_FUNCTION=string] [, RESOLVE_PROCEDURE=string] [, /SKIP_EXISTING] [, SKIP_ROUTINES=string] [, UNRESOLVED=variable]
Note: To properly resolve routines, make sure you run RESOLVE_ALL in an IDL session in which no compilation errors have occurred. This is important because if IDL has previously attempted (and failed) to compile a routine, that routine will be added to IDL’s list of user-defined routines as an uncompiled routine. A subsequent call to RESOLVE_ALL will attempt to compile the uncompiled routine, potentially causing another error.
You can ensure that an IDL session is “clean” either by exiting and restarting IDL or by issuing the .RESET_SESSION executive command.
Arguments
None
Keywords
CLASS
Set this keyword to a string or string array containing object class names.
RESOLVE_ALL’s rules for finding uncompiled functions and procedures are not able to find object definitions or methods, because those things are not known to IDL until the object classes are actually instantiated and the methods called. However, if the CLASS keyword is set, RESOLVE_ALL will ensure that the *__define.pro
files for the specified classes and their superclasses are compiled and executed. RESOLVE_ALL then locates all methods for the specified classes and their superclasses, and makes sure they are also compiled.
CONTINUE_ON_ERROR
Set this keyword to allow continuation upon error.
QUIET
Set this keyword to suppress informational messages.
RESOLVE_EITHER
Set this keyword to a string or string array of routine names to resolve. Use this keyword instead of RESOLVE_FUNCTION or RESOLVE_PROCEDURE if you do not know the type of the routine being resolved. If the routines are already compiled, they are not recompiled.
RESOLVE_FUNCTION
Set this keyword to a string or string array of function names to resolve. If the functions are already compiled, they are not recompiled.
RESOLVE_PROCEDURE
Set this keyword to a string or string array of procedure names to resolve. If the procedures are already compiled, they are not recompiled.
SKIP_EXISTING
By default, if a routine is already compiled in IDL, RESOLVE_ALL will replace the existing code. If you set /SKIP_EXISTING, then any routines that are already compiled are quietly ignored.
Tip: This keyword is useful if you have code (either in a PRO or SAVE file) from an older version of IDL, and you do not want the old routines to replace your currently-compiled "new" routines.
SKIP_ROUTINES
Set this keyword to a string array containing the names of routines not to resolve.
Tip: This keyword is useful when splitting routines across multiple SAVE files, and you do not want one SAVE file to contain routines from a different SAVE file.
Note: Normally, using SKIP as an abbreviated keyword would result in a runtime error, since SKIP_EXISTING and SKIP_ROUTINES start with the same prefix. However, since SKIP_ROUTINES existed prior to SKIP_EXISTING, the abbreviated keyword SKIP will be mapped to SKIP_ROUTINES.
UNRESOLVED
Set this keyword to a variable that will contain the names of the unresolved procedures and functions if CONTINUE_ON_ERROR is set. Routines in the SKIP_ROUTINES list are also included in the result.
Version History
4.0 |
Introduced |
6.0 |
Added CLASS keyword |
8.5.2 |
Added SKIP_EXISTING keyword |