comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Something Has Changed
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Something Has Changed [message #61453] Wed, 16 July 2008 12:59 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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.")
Re: Something Has Changed [message #61473 is a reply to message #61453] Fri, 18 July 2008 10:01 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Douglas Dirks writes:

> Excellent point, Mike. IDL looks *first* in the current directory,
> then starts in the directories
> specified by !PATH. I'll add that to the updated thext.

And, hell, as long as we are making changes, why don't we
point out that *none* of this happens when you are trying
to make a run-time or Virtual Machine program work. That
might save a few hours of headache, too. :-)

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.")
Re: Something Has Changed [message #61474 is a reply to message #61453] Fri, 18 July 2008 09:56 Go to previous message
Douglas Dirks is currently offline  Douglas Dirks
Messages: 5
Registered: June 2008
Junior Member
On Jul 18, 9:50 am, "mgal...@gmail.com" <mgal...@gmail.com> wrote:
> On Jul 18, 9:32 am, Douglas Dirks <ddirk...@gmail.com> wrote:
>
>
>
>> 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
>
> I think it would also be useful to include searching for system
> routines/DLM_PATH and files in the current directory in your steps.
>
> Mike
> --www.michaelgalloy.com
> Tech-X Corporation
> Software Developer II

Excellent point, Mike. IDL looks *first* in the current directory,
then starts in the directories
specified by !PATH. I'll add that to the updated thext.

Thanks,
Doug
Re: Something Has Changed [message #61477 is a reply to message #61453] Fri, 18 July 2008 08:50 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Jul 18, 9:32 am, Douglas Dirks <ddirk...@gmail.com> wrote:
> 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

I think it would also be useful to include searching for system
routines/DLM_PATH and files in the current directory in your steps.

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
Re: Something Has Changed [message #61478 is a reply to message #61453] Fri, 18 July 2008 08:37 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Douglas Dirks writes:

> 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:

Thanks, Doug. After thinking about this some more, I finally
came to the conclusion I was wrong about it all, but it does
help to have is spelled out in a way that even I can get it. :-)

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.")
Re: Something Has Changed [message #61479 is a reply to message #61453] Fri, 18 July 2008 08:32 Go to previous message
Douglas Dirks is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: edit .sav file
Next Topic: IDL Average Value Graphs

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 10:12:53 PDT 2025

Total time taken to generate the page: 2.00171 seconds