
10 Feb
2007
10 Feb
'07
3:21 a.m.
bulat.ziganshin:
Hello Yitzchak,
Friday, February 9, 2007, 3:23:53 PM, you wrote:
I would like to use FFI for the first time. Can someone give me a really, really simple complete example?
nothing can be easier
main = print (c_mysin 1.0)
foreign import ccall "mysin.h mysin" c_mysin :: Double -> Double
Shouldn't that be CDouble? At least for Int/CInt you can hit troubles on 64 bit machines... -- Don