From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA04408; Sat, 12 Oct 2002 19:11:52 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA03822 for ; Sat, 12 Oct 2002 19:11:51 +0200 (MET DST) Received: from laurelin.dementia.org ([208.167.88.73]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9CHBn503033 for ; Sat, 12 Oct 2002 19:11:50 +0200 (MET DST) Received: by laurelin.dementia.org (Postfix, from userid 1001) id 4A71D70D8; Sat, 12 Oct 2002 13:12:24 -0400 (EDT) To: Sven LUTHER Cc: John Carr , Alessandro Baretta , Ocaml Subject: Re: [Caml-list] Runtime overflow and what to do References: <3DA6A4ED.5050700@baretta.com> <200210121613.MAA27433@psi-phi.mit.edu> <20021012165831.GA4700@iliana> From: John Prevost Date: 12 Oct 2002 13:12:23 -0400 (71.693 UMT) In-Reply-To: <20021012165831.GA4700@iliana> Message-ID: <861y6vtwco.fsf@laurelin.dementia.org> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >>>>> "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. 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