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 UAA32120; Mon, 28 Apr 2003 20:57:20 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA32421 for ; Mon, 28 Apr 2003 20:57:19 +0200 (MET DST) Received: from epexch01.qlogic.org ([63.170.40.3]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h3SIvIT29997 for ; Mon, 28 Apr 2003 20:57:18 +0200 (MET DST) Received: from epmailtmp.qlogic.org ([10.20.33.254]) by epexch01.qlogic.org with Microsoft SMTPSVC(5.0.2195.5329); Mon, 28 Apr 2003 13:56:34 -0500 Received: from [10.20.33.146] ([10.20.33.146]) by epmailtmp.qlogic.org with Microsoft SMTPSVC(5.0.2195.4905); Mon, 28 Apr 2003 13:56:34 -0500 Date: Mon, 28 Apr 2003 14:05:32 -0500 (CDT) From: Brian Hurt X-X-Sender: Reply-To: Brian Hurt To: cc: OCaml List Subject: Re: [Caml-list] Looking for a real array In-Reply-To: <200304282151.52240.exa@kablonet.com.tr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 28 Apr 2003 18:56:34.0548 (UTC) FILETIME=[E39E3B40:01C30DB7] X-Spam: no; 0.00; qlogic:01 caml-list:01 eray:01 ozkural:01 unboxed:01 bigarrays:01 semicolons:01 implemented:01 pointers:01 arrays:01 ints:01 ocaml:01 int:01 wrote:03 let:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 28 Apr 2003, Eray Ozkural wrote: > On Monday 28 April 2003 21:43, Brian Hurt wrote: > > I may be confused, but I thought integers were unboxed in arrays (not > > BigArrays, just arrays). Unless you mean references to integers? > > > > Okay, I might be a little confused, forgive me. I thought, implementation > wise, when I say > let a = [| 6, 3, 5, 7, 8 |] Start with, I think you meant [| 6; 3; 5; 7; 8 |]. Notice the semicolons. I say this only because I've been caught on this several times before :-}. > it's implemented by ocaml as > int** a; > in C speak. I thought ints were always unboxed. They fit into a word. That's why they're 31 bits, not 32 bits- the low bit is a tag so the GC can differentiate pointers from ints. Hopefully someone who can speak authoritiatively will speak up. Brian ------------------- 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