Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Int overflow in literals
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-10-30 (19:56)
From: Issac Trotts <ijtrotts@u...>
Subject: Re: [Caml-list] Int overflow in literals
On Thu, Oct 30, 2003 at 02:53:32PM +0100, Marcin 'Qrczak' Kowalczyk wrote:
> I understand that int overflow is not checked on arithmetic for
> efficiency reasons, but IMHO it would be better if it was checked
> at least in literals. When someone writes 10000000000, he certainly
> does not mean -737418240.

If you want to be sure that the number is correctly stored, you can use

    Int64.of_string "10000000000"  



To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: