#1548: printf bugs
-------------------------------+--------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 6.6.1
Severity: normal | Keywords:
Difficulty: Moderate (1 day) | Os: Unknown
Testcase: | Architecture: Unknown
-------------------------------+--------------------------------------------
I think the following are bugs in printf:
{{{
Prelude Text.Printf> printf "%.*f" 2 (1/3) :: String
"*** Exception: Printf.printf: bad formatting char *
(expected: "0.33")
Prelude Text.Printf> printf "%.3s" "foobar" :: String
"foobar"
(expected: "foo")
}}}
This one may not be a bug but it's incompatible with C printf:
{{{
Prelude Text.Printf> printf "%10.5d" 4 :: String
" 4"
(expected: " 00004")
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1548>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs