The ENABLE_SYSRTN procedure enables/disables IDL system routines. This procedure is intended for use by runtime and callable IDL applications, and is not generally useful for interactive use.
The following is a list of cases in which ENABLE_SYSRTN is unable to enable or disable a requested routine. All such attempts are ignored without issuing an error, allowing the application to run without error in different IDL environments:
- Attempts to enable/disable non-existent system routines.
- Attempts to enable a system routine that was disabled due to the mode in which IDL is licensed, as opposed to being disabled via ENABLE_SYSRTN, are quietly ignored.
- The routines CALL_FUNCTION, CALL_METHOD, CALL_PROCEDURE, and EXECUTE cannot be disabled via ENABLE_SYSRTN. However, anything that can be called from them can be disabled, so this is not a significant drawback.
To disable the PRINT procedure:
ENABLE_SYSRTN, /DISABLE, 'PRINT'
To enable the PRINT procedure and disable all other procedures:
ENABLE_SYSRTN, /EXCLUSIVE, 'PRINT'
To ensure all possible functions are enabled:
ENABLE_SYSRTN, /DISABLE, /EXCLUSIVE, /FUNCTIONS
In the last example, all named functions should be disabled and all other functions should be enabled. Since no Routines argument is provided, this means that all routines become enabled.
ENABLE_SYSRTN [, Routines ] [, /DISABLE] [, /EXCLUSIVE] [, /FUNCTIONS]
A string scalar or array giving the names of routines to be enabled or disabled. By default, these are procedures, but this can be changed by setting the FUNCTIONS keyword.
By default, the Routines are enabled. Setting this keyword causes them to be disabled instead.
By default, ENABLE_SYSRTN does not alter routines not listed in Routines. If EXCLUSIVE is set, the specified routines are taken to be the only routines that should be enabled or disabled, and all other routines have the opposite action applied.
Therefore, setting EXCLUSIVE and not DISABLE means that the routines in the Routines argument are enabled and all other system routines of the same type (function or procedure) are disabled. Setting EXCLUSIVE and DISABLE means that all listed routines are disabled and all others are enabled.
Normally, the Routines argument specifies the names of procedures. Set the FUNCTIONS keyword to manipulate functions instead.