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

Home » Public Forums » archive » Re: how to pass a parameter to a .sav routine??
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: how to pass a parameter to a .sav routine?? [message #30004 is a reply to message #30001] Thu, 28 March 2002 00:10 Go to previous messageGo to previous message
R.Bauer is currently offline  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
============================================================ =======
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: launching executables from idl
Next Topic: idlde on mswin vs unix

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

Current Time: Wed Oct 08 17:42:30 PDT 2025

Total time taken to generate the page: 0.00436 seconds