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: Erik de Castro Lopo <mle+ocaml@m...>
Subject: Re: [Caml-list] int_of_string bug
skaller wrote:

> On Thu, 2007-03-29 at 21:26 -0400, Yaron Minsky wrote:
> > # int_of_string "1073741824";;
> > - : int = -1073741824
> > # int_of_string "1073741825";;
> > Exception: Failure "int_of_string".

Thats the behaviour on 32 bit systems.

> # int_of_string "1073741824";;
> - : int = 1073741824
> # int_of_string "1073741825";;
> - : int = 1073741825

But 64 bit systems get it right.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
"Java, the best argument for Smalltalk since C++." -- Frank Winkler