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 PAA26807; Fri, 4 Oct 2002 15:05:31 +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 PAA26869 for ; Fri, 4 Oct 2002 15:05:31 +0200 (MET DST) Received: from decis.be (93.208-78-194.adsl-fix.skynet.be [194.78.208.93]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g94D5U519421 for ; Fri, 4 Oct 2002 15:05:30 +0200 (MET DST) Received: from decis.be ([192.168.0.20]) by decis.be ([194.78.208.93]) with SMTP (MDaemon.PRO.v6.0.5.R) for ; Fri, 04 Oct 2002 15:03:05 +0200 Message-ID: <3D9D93A3.303AE805@decis.be> Date: Fri, 04 Oct 2002 15:12:03 +0200 From: Frederic van der Plancke Reply-To: fvdp@decis.be, fplancke@hotmail.com Organization: Decis X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: owner-caml-list@pauillac.inria.fr CC: caml-list@inria.fr Subject: Re: [Caml-list] Pattern matching and strings (and a mini-bug inScanf) References: <200210041003.MAA19581@pauillac.inria.fr> <3D9D6C28.8060903@baretta.com> <87fzvmieu9.dlv@wanadoo.fr> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MDRemoteIP: 192.168.0.20 X-Return-Path: fvdp@decis.be X-MDaemon-Deliver-To: caml-list@inria.fr Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Remi VANICAT wrote: > > Alessandro Baretta writes: > > > Pierre Weis wrote: > >> [...] > > > >> I should say that I am reluctant to had a special typing rule for the > >> new specifier you proposed, when "%[\000-\255]" does perfectly the job > >> and does not require any addition to the type-checker nor to the > >> implementation of Scanf. > >> Pierre Weis > > > > Why do you mention the type checker? Is each conversion specifier a > > special case for the type checker? > > Of course it is : > > # Scanf.scanf "%s %d %i";; > - : (string -> int -> int -> '_a) -> '_a = > > to type this, the type checker have to look inside the format and find > that %s look for a string, %d and %i an int. But if %z returns a string like %s, does it need an additional case in OCaml's global *type*checker* ? Shouldn't it suffice to modify the function in the scanf implementation that determines the type of a format ? Frédéric vdP ------------------- 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