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: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Runtime overflow and what to do
> OCaml supports 32 and 64 bit integers.  Is it possible to detect at
> compile time the size of the maximum integer?

What about:

        echo "print_int Sys.word_size" > /tmp/caml$$
        WORDSIZE=`ocaml /tmp/caml$$`
        rm -f /tmp/caml$$

WORDSIZE will be set to 32 or 64, depending on the platform.

- Xavier Leroy
-------------------
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