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

Home » Public Forums » archive » Command line arguments
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Command line arguments [message #42537] Fri, 11 February 2005 12:27 Go to previous message
Mr. No Address is currently offline  Mr. No Address
Messages: 11
Registered: February 2005
Junior Member
Way back in the day I posted a very similar question. Someone gave me a
solution using environment variables that has worked fine all this time,
but now I'm updating things and I'm seeking a cleaner solution. Here we
go...

I have a Perl program that I compile and run an IDL program from. I'm
now looping through several hundred times and it seems wasteful to
compile the IDL program every loop.

# The relevant Perl code...
$ENV{"file"}="$filepath";
open(IDL, "|/usr/local/bin/idl") || die "Can't open IDL: $!";
print IDL ".Compile mentor \n";
print IDL "mentor \n";
close IDL;

# The relevant IDL code...
PRO mentor
file=GETENV('file')

I would like to compile the program once outside the loop and then pass
the file using an argument instead grabbing the file from an environment
variable. Can I do something like this?

print IDL "mentor, $filepath\n";

I found a link with google that describes what I want to do. Judging
from the errors I'm getting I'd say I'm close, but as with most
programming errors, close still doesn't work. If this can be done, I'm
guessing I need to add something to my IDL code. I hope the link below
works. If not, google "passing args idl" select groups and select the
fourth link down "IDL batch mode: Command line args?"

http://groups-beta.google.com/group/comp.lang.idl-pvwave/bro wse_thread/thread/47c013740c2cc376/627e5899522d54e8?q=passin g+args+idl&_done=%2Fgroups%3Fq%3Dpassing+args+idl%26hl%3 Den%26lr%3D%26tab%3Dng%26ie%3DUTF-8%26sa%3DN%26&_doneTit le=Back+to+Search&&d#627e5899522d54e8
[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
Previous Topic: Re: IDL Workbench Printing Woes
Next Topic: Re: Newbie math trouble

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

Current Time: Wed Oct 08 19:50:58 PDT 2025

Total time taken to generate the page: 0.00441 seconds