[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | William Chesters <williamc@d...> |
| Subject: | $0.02 suggestion for the Printf module |
Alain Frisch writes:
> As I want to do it often, it would be useful to have a function :
>
> gen_printf: (string -> ()) -> ('a, Buffer.t, unit) format -> 'a
> [or for performance (string -> ()) -> (char -> ()) -> ('a, ... ]
>
> taking as its first argument a 'printing function'
You can do this with Format (and of course you get pretty-printing as
well)---see Format.formatter_of_out_channel, etc. I don't know what
the performance difference, if any, between Printf and Format is.