A startup file is a batch file that is executed automatically each time the IDL is started. You can specify a startup file in either of two ways:
- By specifying the name of the startup file in the Startup File field of the Startup tab of the IDL Development Environment Preferences dialog.
- By specifying the name of the startup file as the value of the IDL_STARTUP environment variable. Note that this method works whether you use IDL in command-line mode or via the IDL Development Environment. If you use the IDL Development Environment and you set both the environment variable and the Startup File preference, IDL will use the value of the environment variable.
Common uses for startup files include the following:
- Restoring variable data contained in a
.sav file or reading in commonly used data
- Setting common keywords to the DEVICE procedure
- Setting up system graphic preferences
- Specifying shared or private color maps for PseudoColor devices
Startup files are executed one statement at a time. It is not possible to define program modules (procedures, functions, or main-level programs) in the startup file. For more information on creating batch files, see Executing Batch Jobs in IDL.