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

Home » Public Forums » archive » passing parameters
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
passing parameters [message #34324] Thu, 06 March 2003 09:27 Go to next message
b.schneiter is currently offline  b.schneiter
Messages: 3
Registered: March 2002
Junior Member
Hello,

I have a problem with stand-alone applications and passing parameters.

I have made a very simple procedure (test.pro) as an example, which
is:

pro test, A

xyouts, 0.5, 0.5, A

end

If I write "test, 36" in the command line in IDL, a new window is
created with "36" written in the middle of it. Simple and it works.

Now, I made a stand-alone application (test.sav) of this procedure,
following the instructions you give in your web-site, because I would
like to use test.sav from outside of IDL. Therefore, I also made a DOS
Batch file to call this new application with the single line:

"c:\test.sav 36"

The parameter "36" doesn't pass through the routine into the variable
A.
How can I get that fixed?

Thank you in advance :)

Bastienne
Re: passing parameters [message #34380 is a reply to message #34324] Wed, 12 March 2003 06:17 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Bastienne Schneiter wrote:
> Reimar Bauer <R.Bauer@fz-juelich.de> wrote in message news:<b483ql$5t0g$1@zam602.zam.kfa-juelich.de>...
>
>> Bastienne Schneiter wrote:
>>
>> Dear Bastienne
>>
>>
>> I am using the following trick.
>>
>>
>>
>> PRO test
>> DEVICE,decomposed=0
>> TEK_COLOR
>> m=GETENV('VAR')
>>
>> XYOUTS, 0.5, 0.5, m,color=4,chars=5,/NORM
>>
>> WAIT,10
>> END
>>
>> This must be saved for runtime usage.
>>
>>
>> And then this is described for linux bash:
>>
>> a simple shell script named for example test.sh
>> with execute rights
>>
>> export VAR=$1
>> idl -rt='/home/idl/test.sav'
>>
>>
>> test.sh 23 gives the result you wish to have
>>
>> I believe in M$ it should work too but I don't remember at the moment
>> how environment variables were defined. Was it set ?
>>
>> regards
>>
>> Reimar
>>
>>
>
>
> Thanks a lot, it works!
>
> I made a DOS batch to run my test.sav and I obtained a wonderfull, big
> and blue "23" in my window. That's all I wanted :)
>
> Have a nice day
>
> Bastienne

Dear Bastienne

please can you post your dos shell programm because then it goes into
the archive.

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/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
Re: passing parameters [message #34403 is a reply to message #34324] Sat, 08 March 2003 08:52 Go to previous message
b.schneiter is currently offline  b.schneiter
Messages: 3
Registered: March 2002
Junior Member
Reimar Bauer <R.Bauer@fz-juelich.de> wrote in message news:<b483ql$5t0g$1@zam602.zam.kfa-juelich.de>...
> Bastienne Schneiter wrote:
>
> Dear Bastienne
>
>
> I am using the following trick.
>
>
>
> PRO test
> DEVICE,decomposed=0
> TEK_COLOR
> m=GETENV('VAR')
>
> XYOUTS, 0.5, 0.5, m,color=4,chars=5,/NORM
>
> WAIT,10
> END
>
> This must be saved for runtime usage.
>
>
> And then this is described for linux bash:
>
> a simple shell script named for example test.sh
> with execute rights
>
> export VAR=$1
> idl -rt='/home/idl/test.sav'
>
>
> test.sh 23 gives the result you wish to have
>
> I believe in M$ it should work too but I don't remember at the moment
> how environment variables were defined. Was it set ?
>
> regards
>
> Reimar
>
>

Thanks a lot, it works!

I made a DOS batch to run my test.sav and I obtained a wonderfull, big
and blue "23" in my window. That's all I wanted :)

Have a nice day

Bastienne
Re: passing parameters [message #34418 is a reply to message #34324] Thu, 06 March 2003 10:24 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Bastienne Schneiter wrote:

Dear Bastienne


I am using the following trick.



PRO test
DEVICE,decomposed=0
TEK_COLOR
m=GETENV('VAR')

XYOUTS, 0.5, 0.5, m,color=4,chars=5,/NORM

WAIT,10
END

This must be saved for runtime usage.


And then this is described for linux bash:

a simple shell script named for example test.sh
with execute rights

export VAR=$1
idl -rt='/home/idl/test.sav'


test.sh 23 gives the result you wish to have

I believe in M$ it should work too but I don't remember at the moment
how environment variables were defined. Was it set ?

regards

Reimar



> Hello,
>
> I have a problem with stand-alone applications and passing parameters.
>
> I have made a very simple procedure (test.pro) as an example, which
> is:
>
> pro test, A
>
> xyouts, 0.5, 0.5, A
>
> end
>
> If I write "test, 36" in the command line in IDL, a new window is
> created with "36" written in the middle of it. Simple and it works.
>
> Now, I made a stand-alone application (test.sav) of this procedure,
> following the instructions you give in your web-site, because I would
> like to use test.sav from outside of IDL. Therefore, I also made a DOS
> Batch file to call this new application with the single line:
>
> "c:\test.sav 36"
>
> The parameter "36" doesn't pass through the routine into the variable
> A.
> How can I get that fixed?
>
> Thank you in advance :)
>
> Bastienne

--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Slow execution with NaNs under Solaris 8 and 9
Next Topic: Re: HELP SAVING QUALITY IMAGES

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

Current Time: Wed Oct 08 18:13:57 PDT 2025

Total time taken to generate the page: 0.00695 seconds