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

Home » Public Forums » archive » Re: Passing Batch File Names
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: Passing Batch File Names [message #62290 is a reply to message #62288] Tue, 02 September 2008 09:27 Go to previous messageGo to previous message
Trae is currently offline  Trae
Messages: 23
Registered: May 2007
Junior Member
On Sep 2, 12:14 pm, Brian Larsen <balar...@gmail.com> wrote:
> Trae,
>
> I'm thinking how one accomplishes this in C, seems to me that this is
> an include file. Is there anything that thinking of it that way makes
> clearer or different? Maybe even as weird as restore and save?

Got it!!!

Even though EXECUTE looks like a function, any variables defined in
the string are inherited by the next level up. So the easy thing to
do is

1. Open the passed file using OPENR
2. Read the contents of the batch file into a string variable.
3. Use EXECUTE to, well, execute the string variable.

So this is the exact same as @batch_name, but this way I don't need
to know the batch file name a priori, at the expense of a few lines of
code.

YAY!

-Trae

PS Brian I will use the file_copy trick in future. Good tip!


>
> One cleaner and better solution to the call_batch thing is to use
> file_copy instead of spawn 'cp '. You take a huge time hit on spawn
> since it executes your .cshrc file each time and with solarsoft in
> your .cshrc that takes a while. I learned this the hard way doing
> some sqlite work from idl.
>
> Cheers,
>
> Brian
>
> ------------------------------------------------------------ --------------
> Brian Larsen
> Boston University
> Center for Space Physicshttp://people.bu.edu/balarsen/Home/IDL
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Singular Value Decomposition in 3 Dimensions
Next Topic: FFT and ROTATE

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

Current Time: Fri Oct 10 06:59:17 PDT 2025

Total time taken to generate the page: 0.96018 seconds