caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Max Skaller <maxs@in.ot.com.au>
To: Jym <jymoyen@ens-lyon.fr>
Cc: caml-list@inria.fr
Subject: Re: probleme de parsing ?
Date: Thu, 02 Mar 2000 13:26:44 +1100	[thread overview]
Message-ID: <38BDD164.B9725124@in.ot.com.au> (raw)
In-Reply-To: <Pine.GSO.4.21.0002292003300.28398-100000@jamaique>

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



  parent reply	other threads:[~2000-03-02 17:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-29 19:06 Jean-Yves Moyen
2000-03-01 17:19 ` Sven LUTHER
2000-03-06  9:07   ` Xavier Leroy
2000-03-06  9:43     ` Sven LUTHER
2000-03-01 18:07 ` Vitaly Lugovsky
2000-03-02  2:26 ` Max Skaller [this message]
2000-03-06  8:52 ` Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38BDD164.B9725124@in.ot.com.au \
    --to=maxs@in.ot.com.au \
    --cc=caml-list@inria.fr \
    --cc=jymoyen@ens-lyon.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).