Zbigniew scripsit:

> To fix in your case, add the following to the top of callit.scm.
> 
> #> float baz(int); <#
> 
> Under normal use, of course, you would use
> #> #include <impl.h> #<

Well, you're right, but I still get the same wrong result: 42.0

> Or use foreign-lambda* and include the code inline.

Now that works:

(define baz (foreign-lambda* float ((int i)) "C_return(((double)i) / 15.2);"))
(print baz)
(print (baz 42))

-- 
"The serene chaos that is Courage, and the phenomenon   [EMAIL PROTECTED]
of Unopened Consciousness have been known to the        John Cowan
Great World eons longer than Extaboulism."
"Why is that?" the woman inquired.
"Because I just made that word up", the Master said wisely.
        --Kehlog Albran, The Profit             http://www.ccil.org/~cowan


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to