Re: how to pass a parameter to a .sav routine?? [message #30004 is a reply to message #30001] |
Thu, 28 March 2002 00:10   |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
David Fanning wrote:
>
> aqueous (aqueous0123@yahoo.com) writes:
>
>> pro saveTest, str
>> if(n_elements(str) eq 0) then $
>> r=dialog_message("No string pased, hi anyway", /INFO) $
>> else $
>> r=dialog_message(str, /INFO)
>> end
>>
>> compile and run. Then:
>>
>> save, /routines, filename="saveTest.sav"
>>
>> exit idl
>>
>> At command window, how do you do the runtime passing the parameter??
>> At IDL command line, I can just type saveTest, "Hello World!" and the
>> pro runs with message "Hello World!", but I've tried things like
>>
>> idl -rt=saveTest.sav , "Hello World!"
>>
>> doesn't work. Would it be different if it were a function instead of
>> procedure? Please help.
>
> The problem with run-time IDL is there ain't nowhere
> to pass the parameter *from*. :-(
>
> Cheers,
>
> David
>
I am using env vars to put data into the aplication.
pro test
text=getenv('IDL_TEXT')
print,text
end
IDL> compile,'test'
IDL> exit
$ export IDL_TEXT='Hello World'
$ idl -rt=test.sav
IDL Version 5.5 (linux x86). (c) 2001, Research Systems, Inc.
Installation number:
Licensed for use by:
Hello World
The routine compile is from our library.
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/compile.tar.gz
regards
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
|
|
|