chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] foreign-lambda - how to declare double array as argu


From: Terrence Brannon
Subject: Re: [Chicken-users] foreign-lambda - how to declare double array as argument and how to pass things to it?
Date: Mon, 12 Nov 2007 07:31:18 -0500

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 11, 2007 10:37 PM, Zbigniew <address@hidden> wrote:
> Did you try passing in an f64vector instead of a vector?
>
>
> On 11/11/07, Terrence Brannon <address@hidden> 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 - not a number-vector or not of the correct type
> > #(0 1 1)
> > f64vector
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]