Wrong about keyword param as output var. [message #4262] |
Thu, 18 May 1995 00:00 |
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 \-/
|
|
|