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

Home » Public Forums » archive » Wrong about keyword param as output var.
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
Wrong about keyword param as output var. [message #4262] Thu, 18 May 1995 00:00
Russ Welti is currently offline  Russ Welti
Messages: 27
Registered: October 1994
Junior Member
Before any sharp-eyed persons correct me for my misstatement
about setting output variables which were passed as keyword
parameters, I thought I would correct myself.

I noticed that simply setting a keyword parameter to a new
value accomplishes the setting of the corresponding passed
in variable's value for the calling routine, regardless of
whether it was defined when the setting routine was called.

So, in:

pro whelp, txt, title=title, lines=lines, exit_text=texit, $
wid=b0, group_leader=grp, help=hlp ; by R.Sterner

the keyword param 'b0' is given a window id in the routine and
is returned to me, where I had not already defined my receiving
variable.

I think it was due to my habit of making local copies:

if n_elements(b0) GT 0 then $
local_b0 = b0 $
else $
local_b0 = <local_default_b0>

that I missed this.
/
Russ Welti /-\
rwelti@u.washington.edu \-/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL excels in debugging??? Do you know something I dont?
Next Topic: IDL complex math error fixed!

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

Current Time: Fri Oct 10 21:31:49 PDT 2025

Total time taken to generate the page: 1.83848 seconds