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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: how to pass a parameter to a .sav routine?? [message #30001] Thu, 28 March 2002 17:08
aqueous0123 is currently offline  aqueous0123
Messages: 11
Registered: September 2001
Junior Member
Thank you all. Its starting to make sense now...
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 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
============================================================ =======
Re: how to pass a parameter to a .sav routine?? [message #30009 is a reply to message #30004] Wed, 27 March 2002 17:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
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 13:56:00 PDT 2025

Total time taken to generate the page: 0.00694 seconds