The IDL_FindNamedVariable() function returns the address of a variable in the current execution scope given its name:

IDL_VPTR IDL_FindNamedVariable(char *name, int ienter)

name

Name of the variable to find.

ienter

Set this parameter to TRUE to create the variable if it does not already exist.

If the variable is found (or created if ienter is TRUE), its IDL_VPTR is returned. Otherwise, NULL is returned.

Note: Even if ienter is TRUE, this routine can return NULL if creating the variable is not possible due to memory constraints.