Previous External Development Guide: Adding System Routines Next

Enabling Routines

The IDL_SysRtnEnable() function is used to enable and/or disable system routines.

Syntax

void IDL_SysRtnEnable(int is_function, IDL_STRING *names,  
                      IDL_MEMINT n, int option,   
                      IDL_SYSRTN_GENERIC disfcn)  

Arguments

is_function

Set to TRUE if functions are being manipulated, FALSE for procedures.

names

NULL, or an array of names of routines.

n

The number of names in names.

option

One of the values from the following table which specify what this routine should do.

Table 15-6: Values for option Argument

Table 15-6: Values for option Argument
Bit
Description
IDL_SRE_ENABLE
Enable specified routines.
IDL_SRE_ENABLE_EXCLUSIVE
Enable specified routines and disable all others.
IDL_SRE_DISABLE
Disable specified routines.
IDL_SRE_DISABLE_EXCLUSIVE
Disable specified routines and enable all others.

disfcn

NULL, or address of an IDL system routine to be called by the IDL interpreter for these disabled routines. If this argument is not provided, a default routine is used.

Result

All routines are enabled/disabled as specified. If a non-existent routine is specified, it is quietly ignored. Attempts to enable routines disabled for licensing reasons are also quietly ignored.


Note
The routines CALL_FUNCTION, CALL_METHOD (function and procedure), CALL_PROCEDURE, and EXECUTE are not real system routines, but are actually special cases that result in different IDL pcode. For this reason, they cannot be disabled. However, anything they can call can be disabled, so this is not a serious drawback.

  IDL Online Help (March 06, 2007)