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

Home » Public Forums » archive » Re: compile and execute from the command line
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: compile and execute from the command line [message #77895 is a reply to message #77894] Wed, 28 September 2011 09:43 Go to previous messageGo to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Thank you for your reply Michael.

The problem was that the routine is not placed in the current
directory so if I do idl -e "MY_ROUTINE" IDL won't find the routine
and won't compile it automatically.
The solution I found is :

routine_path=ROUTINE_FILEPATH('MY_ROUTINE')
idl -e "CD, '''+FILE_DIRNAME(routine_path)+''' & MY_ROUTINE"

Cheers,
nata





On Sep 28, 12:29 pm, Michael Galloy <mgal...@gmail.com> wrote:
> On 9/28/11 8:01 AM, nata wrote:
>
>
>
>
>
>
>
>
>
>> Hello guys,
>
>> Is it possible to compile and execute a routine from the command line
>> without using a SAV file ?
>> I am trying to find a combination of options to do what I want but I
>> don't actually know if this is possible. Something like:
>
>> idl -e "@compile_all.g&  CALL_ROUTINE"
>
>> or
>
>> idl -batch @compile_all.g -e "CALL_ROUTINE"
>
>> Nothing works !
>> I would like to avoid the creation of the sav file. Thank you for your
>> help,
>> nata
>
> I assume you need to do the compilation step because the routines and
> files are not named properly, so that the following doesn't
> automatically compile everything?
>
>    idl -e "MY_ROUTINE"
>
> If so, I would fix the filenames if that is possible. But if that is not
> an option, then I would create a batch file, call it my_batch.pro, that
> contained:
>
>    @compile_all.g
>    MY_ROUTINE
>    exit
>
> Then call that with:
>
>    idl my_batch
>
> Mike
> --
> Michael Galloywww.michaelgalloy.com
> Modern IDL, A Guide to Learning IDL:http://modernidl.idldev.com
> Research Mathematician
> Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: compile and execute from the command line
Next Topic: Is there a work around to save multiple variables with same head but different tails without listing all of them?

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

Current Time: Fri Oct 10 21:39:12 PDT 2025

Total time taken to generate the page: 0.48144 seconds