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 DAA23564; Fri, 26 Apr 2002 03:39:22 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 DAA23384 for ; Fri, 26 Apr 2002 03:39:21 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g3Q1dET03487 for ; Fri, 26 Apr 2002 03:39:14 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id DAA23685 for caml-list@inria.fr; Fri, 26 Apr 2002 03:39:14 +0200 Date: Fri, 26 Apr 2002 03:39:14 +0200 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] How to read three integers from a text-file... ? Message-ID: <20020426033914.B23637@verdot.inria.fr> References: <15557.14957.358556.545541@absurd.mimuw.edu.pl> <20020424212316.GA26318@cs.net.pl> <20020425105559.C392@verdot.inria.fr> <20020425111905.GA31096@kiefer.ai.univie.ac.at> <20020425133343.A31232@fr.thalesgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <20020425133343.A31232@fr.thalesgroup.com>; from jerome.marant@fr.thalesgroup.com on Thu, Apr 25, 2002 at 01:33:44PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Thu, Apr 25, 2002 at 01:33:44PM +0200, Jérôme Marant wrote: > Well, this would make a static printf rather that the well known printf > from C, since the format string may be known only at runtime in some > cases. I did not mean that we are going to change the current printf into a syntax extension. I just said that it is possible. The current implementation is very practical, since you can manipulate format variables, and though it supposes a strange typing. With a syntax extension, you would not have this strange typing and that ability to use format variables: it is just an interesting exercise. I did it one day, but I did not terminated it. About scanf as a Camlp4 syntax extension, I just looked at it: not a so interesting exercice, actually. We need library functions reading integers or strings (but not systematically reading a line), skipping spaces and so on. With a good module with these functions, we are very close to the result, and Camlp4 brings very few more. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- 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