Subchapters:
|
Executing Program Files1) Automatic ExecutionWhen a file is specified by typing only the filename at the IDL prompt, IDL searches first if this file corresponds to an already compiled program, and execute it. If not, IDL search in the current directory for filename.pro (where filename is the specified file) and then for filename.sav. If no file is found in the current directory, IDL searches in the same way in each directory specified by !PATH. If a file is found, IDL automatically compiles the contents and executes any functions or procedures that have the same name as the specified file (excluding the suffix). 2) Explicit ExecutionWhen a file is specified with the .RUN, .RNEW, .COMPILE, or @ commands, IDL searches the current directory for filename.pro (where filename is the file specified) and then for filename. Even if the file corresponds to an already compiled program, it will re-compile it from the source file. It's the way to let IDL know that you change something into a file. If no file is found in the current directory, IDL searches in the same way in each directory specified by !PATH. If a file is found, IDL compiles or runs the file as specified by the executive command used. 3) Interrupting Program ExecutionPrograms that are running can be manually stopped by typing Control-C. This action is called a keyboard interrupt. A message indicating the statement number and program unit being executed is issued on the terminal acknowledging the interrupt. The values of variables can be examined, statements can be entered from the keyboard, and variables can be changed. The program can be resumed by typing the executive command .CONTINUE to resume or .S to execute the next statement and stop. 4) Variable Context After InterruptionThe variable context after a keyboard interruption is that of the program unit in which the interruption occurred. By typing the statement RETURN, the program context will revert to the next higher calling level. The RETALL command returns control to the main program level. If any doubt arises as to which program unit in which the interrupt occurred, the HELP procedure can be used to determine the program context. IDL checks after each statement to see if an interruption has been typed. Execution does not stop until the statement that was active finishes; thus, a long time can elapse from the time the interrupt is typed to the time the program interrupts. 5) Bach programs and journalBach programs are saved into .pro files and are called by @ at the IDL
prompt, or IDL>
journal The file idlsave.pro where open with the first journal call, all the commands
(and the ; IDL Version 5.0 (sunos sparc) tab = findgen(10) You can recall the sequence of commands from idlsave.pro by: IDL> @idlsave |
IDL courses C. Morisset © 2004 IA/UNAM V 2.2 |