Version française
Home     About     Download     Resources     Contact us    
Browse thread
Printf issues
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Till Varoquaux <till.varoquaux@g...>
Subject: Printf issues
I having typing issues with sprintf:

# Printf.sprintf "%a";;
- : (unit -> '_a -> string) -> '_a -> string = <fun>

whereas:

# Printf.printf "%a";;
- : (out_channel -> '_a -> unit) -> '_a -> unit = <fun>

Am I missing something out here? If not why can't sprintf accept the
same printers as the other?

Cheers,
Till

PS: This affects Ocaml 3.9.03 and 3.10 beta, Format and Printf...