Version française
Home     About     Download     Resources     Contact us    
Browse thread
printf - partial application bug
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Pierre Weis <Pierre.Weis@i...>
Subject: Re: printf - partial application bug
> I was surprised to discover that:
> 
> # List.iter2 (Printf.printf " (%d %d)") [1;2;3] [4;5;6];;
>   (1 4)2 5)3 6)
> 
> It appears that a partially applied printf "forgets" everything up to the 
> first format directive.

That's not a bug: it is a feature !

Have a look to the FAQ:

http://pauillac.inria.fr/caml/FAQ/FAQ_EXPERT-eng.html#printf

or (for french speaking camlers)

http://pauillac.inria.fr/caml/FAQ/FAQ_EXPERT-fra.html#printf

Best regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/