Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
printf "%a" vs sprintf "%a"
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Rajchenbach-Teller <David.Teller@e...>
Subject: Re: [Caml-list] printf "%a" vs sprintf "%a"
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)
 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.


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:
> Archives:
> Beginner's list:
> Bug reports:

David Teller-Rajchenbach
 Security of Distributed Systems
   « Ce matin Un crétin A tué un chercheur. » (air connu)
   Latest News of French Research: System being liquidated. Researchers angry.