What the startup file is doing

program names, file names
variable names
prompts, commands, program code


Any line starting with a semi-colon (;) is commented out. This is true in any IDL program. Comments can also start halfway through a line:
code code code ; comments comments comments

The first instruction creates a read-only environment variable (!home) which contains your home directory. (All environment variables must have names which start with a "bang": !).

Next the path (!path -- another environment variable) is established. This tells IDL where to look for source code. This process operates semi-recursevely: any directories within the specified directory which contains files with .pro extensions are added to the path. Be careful about having any directories with no .pro files -- any directories below that may not make it into the path. If you start writing IDL programs of your own, make sure to keep the source code files in the path or to add new directories to the !path definition in the startup files.

newwin creates a display window. The !p.font command sets the font to something readable. The device command makes the cursor look a certain way when the cursor is over the display window (feel free to fiddle with this). The loadct and revvid commands load a certain color map (feel free to fiddle). Several of the the next few commands (.r unixcommands, c, /u, .r scripts, the stty thing, define_key,...) compile and/or run some useful utilities.

The journal... commands establish and maintain journal files in your ~/idlpro/journal directory. A journal file is kept for every IDL session. Damn near every bit of text that appears in the command window is logged to the journal file. These files are named according to the date and time the IDL session is started -- making the filenames sufficiently unique. To keep the contents of this directory from growing arbitrarily large, the second command deletes journal files that have exceeded a certain age. The journal_maintenance, 10 command deletes any files more than ten days old. Feel free to adjust this number.

Most of the rest of the startup file involves identifying, reading from disk, and displaying the diagnostic image.

The delvar commands at the end clean up some of the variables used in the startup file.


Carl Welch