Version française
Home     About     Download     Resources     Contact us    
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)
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.