
12 Feb
2008
12 Feb
'08
8:34 p.m.
Hi
The following code will on Linux print three strings each followed by a NULL byte:
module Main where
putStr0 = putStr $ s ++ "\0"
main = do putStr0 "Hello" putStr0 "Hello" putStr0 "Hello"
On Windows however it will print nothing!
You missed out an s in putStr0, which causes it not to compile. When I add the s, and try on Windows XP with GHC 6.8.1 it works perfectly and prints 3 strings with null bytes. Can you still replicate this? If so, what specific details. Thanks Neil