how to use _EXTRA convention [message #13113] |
Fri, 09 October 1998 00:00 |
nospam
Messages: 21 Registered: November 1997
|
Junior Member |
|
|
I'm a little confused about the _EXTRA convention for passing
parameters to a function works. I'm writing a routine to use with
mpfit (thanks to Craig B. Markwardt), and I want to pass in some extra
arguments via the functargs command. The mpfit procedure calls the
function that I specify like this:
fp = call_function(fcn, xp, _EXTRA=fcnargs)
So, if fcnargs = { X: Xvals, Y: Yvals, Err:Evals, D:dval, G:gval }
then do I define my function like this:
function myfunct, P, X=x, Y=y, Err=err, D=d, G=g
or like this:
function myfunct, P, _EXTRA=e
x = e.X
y = e.Y
err = e.Err
d = e.D
g = e.G
Or something else entirely?
thanks,
scott
--
Scott Stuart
stuart at ll mit edu
|
|
|