From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA27830 for caml-red; Thu, 4 Jan 2001 22:22:07 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA29288 for ; Thu, 4 Jan 2001 22:16:42 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f04LGcL16851; Thu, 4 Jan 2001 22:16:38 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA09622; Thu, 4 Jan 2001 22:16:38 +0100 (MET) From: Pierre Weis Message-Id: <200101042116.WAA09622@pauillac.inria.fr> Subject: Re: printf - partial application bug In-Reply-To: <5.0.0.25.0.20010104114009.00a85670@chasm.org> from Charles Martin at "Jan 4, 101 11:53:08 am" To: martin@chasm.org (Charles Martin) Date: Thu, 4 Jan 2001 22:16:38 +0100 (MET) Cc: caml-list@inria.fr X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr > 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/