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
This archive was generated by hypermail 2b29 : Thu Mar 02 2000 - 18:44:45 MET