From: David Rajchenbach-Teller <David.Teller@ens-lyon.org>
To: Tiphaine Turpin <Tiphaine.Turpin@irisa.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] printf "%a" vs sprintf "%a"
Date: Thu, 26 Mar 2009 18:29:51 +0100 [thread overview]
Message-ID: <1238088591.6241.17.camel@Blefuscu> (raw)
In-Reply-To: <49CBB2F4.6000000@irisa.fr>
Yeah, the behaviour of *printf is weird in this respect (and that of
Extlib's printf is even a tad worse). For this reason, in Batteries
Included, we have
Printf.sprintf (which behaves as the base Printf.sprintf)
and
Printf.sprintf2 (which behaves as you expected)
All of this in addition to our [Print] module, which offers a syntax
comparable with [Printf], but allows extending the format rather than
using %a and %t.
Cheers,
David
On Thu, 2009-03-26 at 17:53 +0100, Tiphaine Turpin wrote:
> Wouldn't it be simpler to have
> two separate directives which accept respectively string printers and
> channel printers, regardless of the outer printing function ?
>
> Tiphaine
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
--
David Teller-Rajchenbach
Security of Distributed Systems
http://www.univ-orleans.fr/lifo/Members/David.Teller
« Ce matin Un crétin A tué un chercheur. » (air connu)
Latest News of French Research: System being liquidated. Researchers angry.
next prev parent reply other threads:[~2009-03-26 17:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 16:53 Tiphaine Turpin
2009-03-26 17:29 ` David Rajchenbach-Teller [this message]
2009-03-26 17:29 ` [Caml-list] " Jérémie Dimino
2009-03-26 17:37 ` Tiphaine Turpin
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=1238088591.6241.17.camel@Blefuscu \
--to=david.teller@ens-lyon.org \
--cc=Tiphaine.Turpin@irisa.fr \
--cc=caml-list@yquem.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