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: -- (:)
From: Marcin 'Qrczak' Kowalczyk <qrczak@k...>
Subject: Re: [Caml-list] Int overflow in literals
W li¶cie z pi±, 31-10-2003, godz. 17:42, Xavier Leroy pisze:

> Based on the comments posted so far on this list, and on a quick
> discussion with colleagues, I'm inclined toward the third approach
> (int_of_string fails in case of overflow).


> Does anyone know of a use scenario where this new behavior of
> int_of_string would be a problem?

I know one, assuming literals in source would be parsed by
int_of_string: writing the -0x40000000 literal.

Some languages explicitly say that it's permissible to write their
maxint+1 value as a literal only as a direct application of negation.

   __("<         Marcin Kowalczyk

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