| Re: Something Has Changed [message #61479 is a reply to message #61453] |
Fri, 18 July 2008 08:32  |
Douglas Dirks
Messages: 5 Registered: June 2008
|
Junior Member |
|
|
IDL's behavior when searching for routines to compile or restore
has not changed -- not in a long time, anyway. In looking at the
documentation on automatic compilation, though, I see that the
behavior is not particularly well described. I'm adding the following
section to the "Automatic Compilation and Execution" topic:
----
A Note on Files with Duplicate Names
If multiple .pro or .sav files with the same base name exist in the
directories
specified by the !PATH system variable, IDL will compile or restore
the first
file it finds, according to the following rules:
1) IDL begins searching in the first directory specified by the
!PATH system variable.
2) If a .pro file whose base name matches the routine specified
exists in the directory being searched, IDL compiles it, runs
the routine, and stops searching.
3) If a .sav file whose base name matches the routine specified
exists in the directory being searched, IDL restores it, runs
the routine, and stops searching.
4) IDL proceeds to the next directory specified by the !PATH
system variable and begins testing again with step 2.
5) If no file whose base name matches the routine specified is
found in the directories specified by the !PATH system variable,
IDL issues an
Attempt to call undefined procedure/function
error, and halts execution.
----
I hope that clears things up a bit,
Doug Dirks
On Jul 16, 1:59 pm, David Fanning <n...@dfanning.com> wrote:
> Folks,
>
> I usually teach in my IDL Programming courses that if you
> are at the IDL command line and you type "junk" that
> IDL goes looking through the IDL PATH for a file "junk.sav",
> then failing to find that, "junk.pro".
>
> In the former case, IDL would restore the already compiled
> routine, whereas in the latter case, it would have to
> compile the file.
>
> This seems no longer to be the case. If I have a "save" file
> and a "pro" file in my local directory, the "pro" file is always
> compiled. The "save" file is ignored.
>
> Does anyone know when this behavior changed? It is this way
> in IDL 6.4 and IDL 7.0.3 for sure.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|