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: -- (:)
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 Archives:
Bug reports: FAQ:
Beginner's list: