The following sections discuss the various ways you can influence IDL's environment and execution.

Startup Options


You can add options to the command that starts IDL. If you are starting IDL from the command or shell prompt, append the option flag after the idl or idlde command. (If you are starting IDL on a Windows platform by clicking an icon, modify the Target field of the properties dialog for the IDL icon to include the option flag.)

See Command-line Options for IDL Startup  for a listing of the available startup options.

Environment Variables Used by IDL


When IDL starts, it checks for the presence of a number of environment variables. If one of these environment variables exists, its value is used in one of two ways:

  • As the value for a preference
  • To configure IDL's environment in such a way that it can load and run

Preferences


Preferences are internal values that control various aspects of the IDL environment. While user preference values are usually retrieved from preference files, the value of any preference can be defined by setting an environment variable of the same name. For example, to set the value of the IDL_PATH preference, which supplies the initial value of the !PATH system variable, you would define an environment variable named IDL_PATH.

If an environment variable corresponding to a preference exists, its value will be used as the value of that preference unless the value is explicitly overridden with a value set at the command line when invoking IDL.

Non-preference Environment Variables


IDL checks the following environment variables at startup, but does not use the values as the values of IDL preferences.

DISPLAY

On UNIX platforms, IDL uses the DISPLAY environment variable to choose which X display is used to display graphics.

HOME

IDL uses the value of the HOME environment variable when storing user-specific information in the local file system.

Note: Under Microsoft Windows, the HOME environment variable might not be set in all cases. If it is not set, IDL first attempts to substitute the USERPROFILE environment variable (which usually looks something like C:\Documents and Settings\username where username is the login name of the current user). If USERPROFILE is not set, IDL uses the value of the first of the following it finds: the TEMP environment variable, the TMP environment variable, or the Windows system directory.

IDL_BRIDGE_DEBUG

The IDL export bridges check the value of the IDL_BRIDGE_DEBUG environment variable to enable or disable debugging support. Setting this environment variable to an appropriate value causes the Connectivity bridge to send debugging information that would typically appear in the IDL Output log to stdout. In addition, on Windows systems, debugging information is written with the OutputDebugString() API, whose output can be captured by the Debug Monitor ( DBMON.exe ) tool (provided in the Platform SDK), Visual Studio, or the WinDbg debugger.

When IDL_BRIDGE_DEBUG is enabled, the following debug information is available:

  • Library load errors (on Windows)
  • IDL execution errors
  • Output from the IDL print command

Valid values for the IDL_BRIDGE_DEBUG environment variable are 0 to turn debug output off; 1 to turn it on. All other values will be ignored.

IDLJAVAB_CONFIG

The IDL-Java bridge uses the value of the IDLJAVAB_CONFIG environment variable to locate the IDL-Java bridge configuration file.

IDLJAVAB_LIB_LOCATION

The IDL-Java bridge uses the value of the IDLJAVAB_LIB_LOCATION environment variable to determine which JVM shared library within a given Java version to use.

Note: This only works for command-line IDL. When launching the Workbench the IDL-Java bridge uses the same Java version as the Workbench.

LD_LIBRARY_PATH

On UNIX systems, the Java Connectivity bridges use the value of the LD_LIBRARY_PATH environment variable to determine where IDL's shared library files are located.

PATH

When IDL asks for an operating system resource such as a shell, the executable file for that resource must be located in the operating system's path. While IDL itself does not use the value of the PATH environment variable explicitly, its value does affect IDL's behavior when attempting to launch other applications.

TERM

On UNIX platforms, IDL uses the environment variable TERM to determine the type of terminal in use when IDL is in command-line mode.

Setting Environment Variables


The process used to set environment variables varies depending on the operating system you are using.

UNIX and Mac Systems

On UNIX systems, environment variables are generally specified in a file read by your shell program at startup. Syntax for setting environment variables varies depending on the shell you are using, as does the file you use to specify the variables. If you are unsure how to set environment variables on your system, consult the system documentation or a system administrator.

Microsoft Windows Systems

On Microsoft Windows systems, environment variables are set in the Environment Variables dialog, which is accessible from the System Control panel. Some Windows versions allow you to set environment variables either only for the user you logged in as ("user variables") or for all users ("system variables"). Setting IDL environment variables as user variables means that other users who log on to the computer will not have access to your environment variable values.