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

Home » Public Forums » archive » Compile or not compile?
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
Compile or not compile? [message #42879] Mon, 28 February 2005 08:38 Go to next message
Nuno Oliveira is currently offline  Nuno Oliveira
Messages: 75
Registered: October 2003
Member
There's something that sometimes in while it bores me a little bit. How
do I know if I need to compile a function/procedure or it will be able
to compile "on fly".

At the beginning I thought this was related to the paths idl "knew", but
this happens for two functions/routines in the same directory.

Can someone tell when a function can be runned without be compile?
Re: Compile or not compile? [message #43149 is a reply to message #42879] Mon, 21 March 2005 11:47 Go to previous messageGo to next message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <pan.2005.03.21.16.40.40.173850@as.arizona.edu>,
JD Smith <jdsmith@as.arizona.edu> wrote:

> The other thing to note is that the PATH is not cached on startup,
> only after the first time it is read. So try something like:
>
> IDL> .run file_in_my_path
>
> create another_file_in_my_path.pro in the same location as
> file_in_my_path.pro
>
> IDL> .run another_file_in_my_path.pro
>
> This will fail if the paths are cached.

In my experience (OS X), creating a new program file after starting IDL
gives the following behavior (file names appropriated from above):

IDL> file_in_my_path
% Compiled module: FILE_IN_MY_PATH.

Then create a new program file

IDL> another_file_in_my_path
% Attempt to call undefined procedure/function:
'ANOTHER_FILE_IN_MY_PATH'.
% Execution halted at: $MAIN$
IDL> .r another_file_in_my_path
% Compiled module:.ANOTHER_FILE_IN_MY_PATH

So, automatic compilation does not work, but manual compilation does. I
still don't understand that.

Ken Bowman
Re: Compile or not compile? [message #43151 is a reply to message #43149] Mon, 21 March 2005 12:29 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth Bowman writes:

> In my experience (OS X), creating a new program file after starting IDL
> gives the following behavior (file names appropriated from above):
>
> IDL> file_in_my_path
> % Compiled module: FILE_IN_MY_PATH.
>
> Then create a new program file
>
> IDL> another_file_in_my_path
> % Attempt to call undefined procedure/function:
> 'ANOTHER_FILE_IN_MY_PATH'.
> % Execution halted at: $MAIN$
> IDL> .r another_file_in_my_path
> % Compiled module:.ANOTHER_FILE_IN_MY_PATH
>
> So, automatic compilation does not work, but manual compilation does. I
> still don't understand that.

Well, if you don't understand it AND you don't like
it, I would turn path caching off. Something like this
in your startup file would do it:

PATH_CACHE, ENABLE=0

Or, if you don't understand it, but like the speed with
which IDL can find files now, you could do this after
you save the new file:

IDL> PATH_CACHE, /CLEAR

Now, when you type the new file name IDL will rebuild the cache
with the new file in it so it can be found automatically. (Building
the cache again could be slow, but no slower than finding the file
pre IDL 6.0, I should think).

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IRIG Time Stamp to Julday
Next Topic: (",) Do You Want To Know For Sure You Are Going To Heaven?

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

Current Time: Fri Oct 10 10:15:48 PDT 2025

Total time taken to generate the page: 1.03960 seconds