Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] C -> CAML linking: loosing values in arrays??
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Artem Prisyznuk <tema@s...>
Subject: Re: [Caml-list] C -> CAML linking: loosing values in arrays??
11.01.03 22:07:51, Daniel Andor <da209@cam.ac.uk> wrote:

>If I pass a non-array double using copy_double(), it works and I get the 
>correct number on the other side.
>
>Any ideas as to where I've gone wrong?


>From Caml manual:

....
18.3.3
Arrays

Arrays of integers and pointers are represented like tuples, that is, as pointers to blocks tagged 0. They are accessed with the Field macro for reading and the modify 
function for writing.

Arrays of floating-point numbers (type float array) have a _special, unboxed_, more efficient representation. These arrays are represented by pointers to blocks with 
tag Double_array_tag. They should be accessed with the Double_field and Store_double_field macros.
....


>
>Thanks,
>Daniel.
>-------------------
>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
>


-------------------
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