Bonjour,
I would like a Caml program to output some information to an output
channel and according to my needs this channel be redirected to
- a (human readable) file
- the standard output
- a black hole
The "general output functions" section of Pervasives seem to be what I
need but it hasn't the same signature than "Output functions on
standard output"
print_char -> output_char
print_string -> output_string
print_int -> ?
print_float -> ?
print_endline -> ?
print_newline -> ?
I suspect I could just compose with string_of_X functions to obtain
the same result. There is also an awful [fprintf] function inherided
from C but I am still trying to understand the doc (never understood
C's either).
Why haven't the equivalent functions been added to the standard lib to
allow a drop in replacement ?
Diego Olivier