From: Diego Olivier Fernandez Pons <Diego.FERNANDEZ_PONS@etu.upmc.fr>
To: caml-list@inria.fr
Subject: Pervasives 'general output functions'
Date: Fri, 29 Oct 2004 11:40:52 +0200 (DST) [thread overview]
Message-ID: <Pine.A41.4.44.0410291115470.1798336-100000@ibm1> (raw)
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
next reply other threads:[~2004-10-29 9:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-29 9:40 Diego Olivier Fernandez Pons [this message]
2004-10-29 10:12 ` [Caml-list] " Nicolas Cannasse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.A41.4.44.0410291115470.1798336-100000@ibm1 \
--to=diego.fernandez_pons@etu.upmc.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox