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

Home » Public Forums » archive » Re: On-the-fly compilation of routines
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
Re: On-the-fly compilation of routines [message #63322] Thu, 06 November 2008 08:05 Go to next message
edward.s.meinel@aero. is currently offline  edward.s.meinel@aero.
Messages: 52
Registered: February 2005
Member
On Nov 6, 10:31 am, David Fanning <n...@dfanning.com> wrote:
> gsever writes:
>> Could you please elaborate a little more your yes answers?
>
> I think what Reimar means is that this is *always* how things
> work in IDL. It would be extremely unnatural if you always
> had to compile files in IDL. Once compiled, IDL programs
> stay compiled for that IDL session, unless you specifically
> recompile them. You can recompile any program that changed
> at any time you like. Then, you will be running the *new*
> compiled program.
>
> 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.")

And that command would be ... <drum roll> ...

.compile your_program_name

<cymbal splash>

Ed M
Re: On-the-fly compilation of routines [message #63323 is a reply to message #63322] Thu, 06 November 2008 08:00 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
gsever schrieb:
> Hello,
>
> Thanks for your inputs.
>
> Could you please elaborate a little more your yes answers?

try out the example at bottom and read the messages in your log window.
That's how it works.

cheers
Reimar

>
> On Nov 6, 2:57 am, Reimar Bauer <R.Ba...@fz-juelich.de> wrote:
>> gsever schrieb:
>>
>>> Hello,
>>> I would like to know whether it is possible to compile a routine while
>>> I am already running my main IDL program?
>> yes
>>
>>> To illustrate more this, I will explain my intention a bit more. We
>>> have a powerful IDL-based data analysis tool in our atmospheric
>>> sciences department to analyze airborne acquired data. I am currently
>>> working on a spectrum plot routine of the this tool-suite to make
>>> small modification and learning purposes. I successfully debug the
>>> routines from within the IDL Workbench, but whenever I make a change
>>> on the program or wanted to set a new breakpoint I have to restart the
>>> program and compile all the routines. My question is again, is there a
>>> way to update my current routine in a way to see the changes are going
>>> to be reflected without restarting and compiling everything?
>> yes
>>
>>
>>
>>> Another point is, can we compile only the recently changed routines in
>>> the beginning of each compilation process?
>> yes
>>
>>
>>
>>> I appreciate your comments on these issues.
>>> Thank you again.
>> I have no idea how you organize your routines but there are common rules.
>>
>> a) use one file per routine
>> b) name the file name of the file exactly the same as your routine
>> b.a) use the extension .pro
>> c) use always lower case file names.
>> d) make sure your file are saved in the the idl search path, check
>> !path
>>
>> e) file a bug report if it does not behave (you already doing so)
>>
>> if not a) make sure the last routine in the file is the one used for the
>> file name.
>>
>> For example just open the ide and call print, mean(findgen(10)).
>> mean is a idl source function. You can open it by .edit mean on the idl
>> input line.
>>
>> cheers
>> Reimar
>
Re: On-the-fly compilation of routines [message #63324 is a reply to message #63323] Thu, 06 November 2008 07:31 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
gsever writes:

> Could you please elaborate a little more your yes answers?

I think what Reimar means is that this is *always* how things
work in IDL. It would be extremely unnatural if you always
had to compile files in IDL. Once compiled, IDL programs
stay compiled for that IDL session, unless you specifically
recompile them. You can recompile any program that changed
at any time you like. Then, you will be running the *new*
compiled program.

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: On-the-fly compilation of routines [message #63326 is a reply to message #63324] Thu, 06 November 2008 07:19 Go to previous messageGo to next message
gsever is currently offline  gsever
Messages: 28
Registered: August 2008
Junior Member
Hello,

Thanks for your inputs.

Could you please elaborate a little more your yes answers?

On Nov 6, 2:57 am, Reimar Bauer <R.Ba...@fz-juelich.de> wrote:
> gsever schrieb:
>
>> Hello,
>
>> I would like to know whether it is possible to compile a routine while
>> I am already running my main IDL program?
>
> yes
>
>> To illustrate more this, I will explain my intention a bit more. We
>> have a powerful IDL-based data analysis tool in our atmospheric
>> sciences department to analyze airborne acquired data. I am currently
>> working on a spectrum plot routine of the this tool-suite to make
>> small modification and learning purposes. I successfully debug the
>> routines from within the IDL Workbench, but whenever I make a change
>> on the program or wanted to set a new breakpoint I have to restart the
>> program and compile all the routines. My question is again, is there a
>> way to update my current routine in a way to see the changes are going
>> to be reflected without restarting and compiling everything?
>
> yes
>
>
>
>> Another point is, can we compile only the recently changed routines in
>> the beginning of each compilation process?
>
> yes
>
>
>
>> I appreciate your comments on these issues.
>
>> Thank you again.
>
> I have no idea how you organize your routines but there are common rules.
>
>  a) use one file per routine
>  b) name the file name of the file exactly the same as your routine
>   b.a) use the extension .pro
>  c) use always lower case file names.
>  d) make sure your file are saved in the the idl search path, check
>    !path
>
>  e) file a bug report if it does not behave (you already doing so)
>
> if not a) make sure the last routine in the file is the one used for the
> file name.
>
> For example just open the ide and call print, mean(findgen(10)).
> mean is a idl source function. You can open it by .edit mean on the idl
> input line.
>
> cheers
> Reimar
Re: On-the-fly compilation of routines [message #63330 is a reply to message #63326] Thu, 06 November 2008 00:57 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
gsever schrieb:
> Hello,
>
> I would like to know whether it is possible to compile a routine while
> I am already running my main IDL program?

yes


> To illustrate more this, I will explain my intention a bit more. We
> have a powerful IDL-based data analysis tool in our atmospheric
> sciences department to analyze airborne acquired data. I am currently
> working on a spectrum plot routine of the this tool-suite to make
> small modification and learning purposes. I successfully debug the
> routines from within the IDL Workbench, but whenever I make a change
> on the program or wanted to set a new breakpoint I have to restart the
> program and compile all the routines. My question is again, is there a
> way to update my current routine in a way to see the changes are going
> to be reflected without restarting and compiling everything?

yes


>
> Another point is, can we compile only the recently changed routines in
> the beginning of each compilation process?

yes

>
> I appreciate your comments on these issues.
>
> Thank you again.

I have no idea how you organize your routines but there are common rules.

a) use one file per routine
b) name the file name of the file exactly the same as your routine
b.a) use the extension .pro
c) use always lower case file names.
d) make sure your file are saved in the the idl search path, check
!path

e) file a bug report if it does not behave (you already doing so)

if not a) make sure the last routine in the file is the one used for the
file name.

For example just open the ide and call print, mean(findgen(10)).
mean is a idl source function. You can open it by .edit mean on the idl
input line.

cheers
Reimar
Re: On-the-fly compilation of routines [message #63379 is a reply to message #63330] Thu, 06 November 2008 17:30 Go to previous message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
> mean is a idl source function. You can open it by .edit mean on the idl input line.

Well I'll be!!

17 years programming in IDL and I never knew this.

What else don't I know? I'll go ask my wife - she'll tell me... ;-)

Andrew
Re: On-the-fly compilation of routines [message #63416 is a reply to message #63322] Thu, 06 November 2008 09:05 Go to previous message
gsever is currently offline  gsever
Messages: 28
Registered: August 2008
Junior Member
So my understanding is IDL interpreter itself can not sense the change
and re-compile the necessary procedure throughout the flow of the
program. Every time I make a modification on the source-code I have to
re-compile the routine on the console or command shell to reflect this
change.

Once again, in the same IDL session, when I first launch the program
168 routines are compiled, after I make an addition the source code of
one file, and re-run the program all 168 routines are re-compiled
again. This is controversial to Reimer Bauer's yes answer.


On Nov 6, 10:05 am, "edward.s.mei...@aero.org" <mei...@aero.org>
wrote:
> On Nov 6, 10:31 am, David Fanning <n...@dfanning.com> wrote:
>
>
>
>> gsever writes:
>>> Could you please elaborate a little more your yes answers?
>
>> I think what Reimar means is that this is *always* how things
>> work in IDL. It would be extremely unnatural if you always
>> had to compile files in IDL. Once compiled, IDL programs
>> stay compiled for that IDL session, unless you specifically
>> recompile them. You can recompile any program that changed
>> at any time you like. Then, you will be running the *new*
>> compiled program.
>
>> 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.")
>
> And that command would be ... <drum roll> ...
>
> .compile your_program_name
>
> <cymbal splash>
>
> Ed M
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Sinusoidal map projection set up
Next Topic: ONLINE TRADING

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

Current Time: Wed Oct 08 18:07:11 PDT 2025

Total time taken to generate the page: 0.00666 seconds