From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA28200; Fri, 3 May 2002 12:15:52 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA28181 for caml-list@pauillac.inria.fr; Fri, 3 May 2002 12:15:52 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA14732 for ; Thu, 2 May 2002 19:50:49 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from chinon (aboukir-101-1-17-jmarant.adsl.nerim.net [62.212.105.6]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g42HomX13694 for ; Thu, 2 May 2002 19:50:49 +0200 (MET DST) Received: from jerome by chinon with local (Exim 3.35 #1 (Debian)) id 173KjA-0000SP-00 for ; Thu, 02 May 2002 19:50:48 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] printf and scanf References: <20020501180052.GA13445@hell.mine.nu> <20020502102557.A1696@fr.thalesgroup.com> From: jmarant@nerim.net (=?iso-8859-1?q?J=E9r=F4me?= Marant) Date: Thu, 02 May 2002 19:50:48 +0200 In-Reply-To: (Pixel's message of "02 May 2002 18:11:24 +0200") Message-ID: <87helqzbev.fsf@marant.org> User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Pixel writes: > this only shows that " %2$s %1$d" is not a valid translation of " %s %d", > since they do not have the same type, and would fail at runtime (using this in > C would give you a segfault). > > " %2$d %1$s" with type "string -> int" is a valid translation of " %s %d" > > this means that not checking the translations could lead to a hole in the type > system, and so printf must be prepared to detect type errors (which it > currently does :) Hmm, you're correct, I was mistaken. Perhaps I should reead the sprintf manpage. But it doesn't have the feature anyway. Regards, -- Jérôme Marant http://marant.org ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners