Version française
Home     About     Download     Resources     Contact us    
Browse thread
int_of_string bug
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Toby Kelsey <toby.kelsey@g...>
Subject: Re: [Caml-list] int_of_string bug
Markus Mottl wrote:

> The problem is just shifted to bigger numbers.  This problem arises
> with all integer conversion functions, i.e. Int64.of_string,
> Int32.of_string, Nativeint.of_string, int_of_string.
> 
> Regards
> Markus

This bug is not just a conversion problem:

# let x = 1073741824;;
val x : int = -1073741824
# (x < 0) && (x >= -x);;
- : bool = true

Toby