Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Vitaly Lugovsky <vsl@ontil.ihep.su>
To: Jean-Yves Moyen <jymoyen@ens-lyon.fr>
Cc: caml-list@inria.fr
Subject: Re: probleme de parsing ?
Date: Wed, 1 Mar 2000 21:07:39 +0300 (MSK)	[thread overview]
Message-ID: <Pine.LNX.4.10.10003012105420.7077-100000@ontil.ihep.su> (raw)
In-Reply-To: <Pine.GSO.4.21.0002292003300.28398-100000@jamaique>

On Tue, 29 Feb 2000, 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
> 
> (avec Ocaml 2.04)
> 
> Est-ce voulu ? Si oui, pourquoi avoir introduit cette difference ?

 Here is a kinda hack for it. Dunno, can it be a convential solution,
we have not standard documents, etc...

ocaml/byterun/ints.c:
-----
24a25,26
> #define _isdelimeter(c) ((c)==' ' || (c)=='\t' || (c)=='\n')
> 
29a32
>   while(_isdelimeter(*p)) p++;
------


--

   V.S.Lugovsky aka Mauhuur (http://ontil.ihep.su/~vsl) (UIN=45482254)





  parent reply	other threads:[~2000-03-01 19:02 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 [this message]
2000-03-02  2:26 ` Max Skaller
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=Pine.LNX.4.10.10003012105420.7077-100000@ontil.ihep.su \
    --to=vsl@ontil.ihep.su \
    --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