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
Re: [Caml-list] Runtime overflow and what to do
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-12 (17:11)
From: John Prevost <j.prevost@c...>
Subject: Re: [Caml-list] Runtime overflow and what to do
>>>>> "sl" == Sven LUTHER <> writes:

    sl> On Sat, Oct 12, 2002 at 12:13:32PM -0400, John Carr wrote:

    >> OCaml supports 32 and 64 bit integers.  Is it possible to
    >> detect at compile time the size of the maximum integer?

    sl> val max_int : int

    sl>    The greatest representable integer.

But that's at runtime.  Which, actually, is the best you can
do--bytecode compiled things might run on any architecture.  Native
compiled things you can rely on more.  But if you want to compile this
knowledge in, you'll have to have some configure script that
determines the word size and chooses which version to compile.


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