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