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 SAA09874 for caml-redistribution@pauillac.inria.fr; Thu, 2 Mar 2000 18:39:29 +0100 (MET) Resent-Message-Id: <200003021739.SAA09874@pauillac.inria.fr> 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 DAA28129 for ; Thu, 2 Mar 2000 03:22:33 +0100 (MET) Received: from ot-link.ot.com.au ([203.5.3.1]) by nez-perce.inria.fr (8.8.7/8.8.7) with SMTP id DAA13967 for ; Thu, 2 Mar 2000 03:22:02 +0100 (MET) Received: (qmail 28544 invoked from network); 2 Mar 2000 02:20:48 -0000 Received: from unknown (HELO druid.in.ot.com.au) (203.5.4.202) by 203.5.4.251 with SMTP; 2 Mar 2000 02:20:48 -0000 Received: (qmail 853 invoked from network); 2 Mar 2000 02:20:36 -0000 Received: from merlin.in.ot.com.au (HELO in.ot.com.au) (203.5.4.26) by druid.in.ot.com.au with SMTP; 2 Mar 2000 02:20:36 -0000 Sender: maxs@inria.fr Message-ID: <38BDD164.B9725124@in.ot.com.au> Date: Thu, 02 Mar 2000 13:26:44 +1100 From: Max Skaller Organization: Open Telecommunications Ltd X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: Jym CC: caml-list@inria.fr Subject: Re: probleme de parsing ? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-From: weis@pauillac.inria.fr Resent-Date: Thu, 2 Mar 2000 18:39:29 +0100 Resent-To: caml-redistribution@pauillac.inria.fr Jean-Yves Moyen wrote: > > Bonjour, il y a apparamment un probleme de parsing des chaines dans la > fonction int_of_string : les espaces precedents (ou suivant) les nombres > ne sont pas eliminer. En revanche, il le sont dans la fonction > float_of_string : > > # int_of_string " 5";; > Uncaught exception: Failure("int_of_string") > #float_of_string " 5";; > - : float = 5 Furthermore, the float value is wrong: it should be "5.0", a value which would be parsed as a float by the compiler. [Both parser functions above should fault, IMHO: the string should contain exactly the number, no leading spaces] -- John (Max) Skaller at OTT [Open Telecommications Ltd] mailto:maxs@in.ot.com.au -- at work mailto:skaller@maxtal.com.au -- at home