William Xu wrote:
[...]
(foreign-declare "
double my_pi;
")
(foreign-parse "
double my_pi = 3.14;
")
(print (sin my_pi))
[...]
Hello,
if I'm not mistaken, easyffi generates parameter style procedures to
acces global C variables, probably because it is impossible in CHICKEN
to create "magic" Scheme variables that map directly to C variables.
Therefore the correct way to use my_pi in your example would be
(print (sin (my_pi)))
As my_pi isn't declared constant you could also modify its value using a
call like
(my_pi 3.1415)
cu,
Thomas
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users