> EXPORT32 long FAR EXPORT rzrfit(float FAR *,long,long,float FAR
> *,long,long,float FAR *,float FAR *,float FAR *,float FAR *,
> long FAR *,long FAR *,long FAR *,float FAR datmat[][40],float
> FAR *,float FAR *,long FAR *,float FAR *,long);
>
> and the code generated after configuring Call Library is:
>
> long rzrfit(float ydata[], long n2, long m, float shape[], long nl2,
> long ml,
> float yout[], float vnoise[], float baslin[], float w[], long
> *n,
> long *ifast, long *istat, float datmat[], float covar[], float
> hess[],
> long iwork[], float work[], long mmax);
>
That's a lot of parameters. As the other response pointed out, you need
to be aware of any sizing assumptions the call makes. Sometimes these
functions expect y
ou to make a first call to learn the sizes of the
parameters, then size your arrays, then make a second call passing in
the sized arrays. Other times, the size is agreed upon in the
interface, and both sides just know that it is 256 elements or such.
Be especially careful about the datmat parameter as not only do you need
to get the buffer sized correctly, but you need to get the shape
correct, and you may even need to transpose it.
Greg McKaskle