Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: John Prevost <j.prevost@c...>
Subject: Re: [Caml-list] Runtime overflow and what to do
>>>>> "sl" == Sven LUTHER <luther@dpt-info.u-strasbg.fr> 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.

John.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners