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 QAA14238; Tue, 24 Feb 2004 16:19:27 +0100 (MET) 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 QAA11960 for ; Tue, 24 Feb 2004 16:19:26 +0100 (MET) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i1OFJQIq012719 for ; Tue, 24 Feb 2004 16:19:26 +0100 Received: from oro (naked.iki.fi [62.142.249.112]) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id 14CC7F1784F; Tue, 24 Feb 2004 17:19:25 +0200 (EET) Received: from naked by oro with local (Exim 3.36 #1 (Debian)) id 1AveLE-000457-00; Tue, 24 Feb 2004 17:19:24 +0200 To: =?iso-8859-1?q?Andr=E9_Luiz_Moura?= Cc: caml-list@inria.fr Subject: Re: [Caml-list] Value of the address of a pointer References: <20040220172906.7855.qmail@web60603.mail.yahoo.com> From: Nuutti Kotivuori Date: Tue, 24 Feb 2004 17:19:23 +0200 In-Reply-To: <20040220172906.7855.qmail@web60603.mail.yahoo.com> (Andr's message of "Fri, 20 Feb 2004 14:29:06 -0300 (ART)") Message-ID: <87ishw7bes.fsf@naked.iki.fi> User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Portable Code, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 newbie:01 ocaml:01 ocaml:01 caml:01 address:96 address:96 pointer:03 pointer:03 wrote:03 array:04 array:04 separately:05 iki:07 i'm:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Andr wrote: > Please, it would like to know as to get in OCaml the value of the > address of memory of a pointer, as it occurs in the example in C > that follows: You cannot obtain a pointer to a certain element in an array in OCaml. And in any case it does not make sense unless you plan on modifying the element. If you do plan on modifying it, you will either have to carry both the array itself and an index to the element inside it separately - or you will have to have an array of references to values and use it accordingly then. I'm a relative OCaml newbie though, so hopefully someone will correct me if I am wrong. -- Naked ------------------- 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