Commit 6fe7be9d authored by simonmar's avatar simonmar
Browse files

[project @ 2002-03-18 13:58:30 by simonmar]

Passing a Float to a varargs C function isn't possible, so pass a
Double instead.
parent 8560d9cd
{-# OPTIONS -fasm #-}
-- !!! Test passing floats to a ccall, was broken in the NCG in 5.02.2
-- !!! Test passing doubles to a ccall
import Foreign
import Foreign.C
foreign import ccall unsafe
printf :: CString -> Float -> IO CInt
printf :: CString -> Double -> IO CInt
main = withCString "%f" $ \s -> printf s 1.2345
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment