Re: [Chicken-users] foreign-lambda - how to declare double array as argument and how to pass things to it?

2007-11-12 Thread Zbigniew
srfi-4 doc is a good place to look for info on number-vectors. All you need do there is replace vector with f64vector and vector-length with f64vector-length. I think this should work. On 11/12/07, Terrence Brannon <[EMAIL PROTECTED]> wrote: > Well, no here is what I did: > (let ([vec (vector 0

Re: [Chicken-users] foreign-lambda - how to declare double array as argument and how to pass things to it?

2007-11-12 Thread Terrence Brannon
Well, no here is what I did: (let ([vec (vector 0 1 1)]) (polevl 42 vec (vector-length vec))) how would I pass in an f64 vec? and was I right in choosing f64vec on the chicken side for a C function with this signature: double polevl( x, coef, N ) double x; double coef[]; int N; { ... } On Nov

Re: [Chicken-users] foreign-lambda - how to declare double array as argument and how to pass things to it?

2007-11-11 Thread Zbigniew
Did you try passing in an f64vector instead of a vector? On 11/11/07, Terrence Brannon <[EMAIL PROTECTED]> wrote: > My guess was f64vector. That compiled, but passing a Scheme vector in failed: > > #;2> (let ([vec (vector 0 1 1)]) (polevl 42 vec (vector-length vec))) > Error: bad argument type - n