English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Value of the address of a pointer
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-02-24 (15:19)
From: Nuutti Kotivuori <naked+caml@n...>
Subject: Re: [Caml-list] Value of the address of a pointer
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