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

Home » Public Forums » archive » Re: Q: Calling .PRO from a program
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: Q: Calling .PRO from a program [message #11660 is a reply to message #11647] Tue, 19 May 1998 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Martin Fuhrer (martin.fuhrer@computer.org) writes:

> I'm running IDL V5.0.2 WIN32 under WIN95 and I am writing a
> widget-based program. At some point my program calls another IDL program
> with keywords and parameters stored in local variables. I expected the
> program to behave like:
> IDL> myDirectory = 'C:\RSI\myData'
> IDL>ImageOut, myDirectory
> but it won't!
>
> For details see below:
> ..
> If (cpy eq 0) Then Begin
> kwd1 = 'HCOPY=0'
> ..
> EndIf Else Begin
> kwd1 = 'HCOPY=1'
> ..
> EndElse
> ;call other idl program (EM.PRO) with keyword now
> EM, kwd1

Programs should be called in widget programs exactly
the way they are called on the IDL command line. For
example, on the IDL command line you call your EM
program like this:

IDL> EM, HCOPY=1

You should do the same in your widget code:

If (cpy eq 0) Then EM, HCOPY=0 Else EM, HCOPY=1

It is possible to create keywords as strings, but then
you need to "execute" the command string, like this:

command = 'EM'
keyword = 'HCOPY=1'
ok = EXECUTE(command + ',' + keyword)

You can find more information about things like this
on my web page or (especially) in my IDL Programming
Techniques book.

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Scroll bars in scalable draw widgets
Next Topic: Re: Insight and HDF files

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

Current Time: Fri Oct 10 02:37:24 PDT 2025

Total time taken to generate the page: 1.59811 seconds