Version française
Home     About     Download     Resources     Contact us    
Browse thread
Give back a Pair from C to OCaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Till Varoquaux <till.varoquaux@g...>
Subject: Re: [Caml-list] Give back a Pair from C to OCaml?
from the manual:

>>Tuples are represented by pointers to blocks, with tag 0.

You have to create a block with two fields and put each integer in one
of these fields (ocaml integers  that is). I can't tell you exactly
from the top of my head but I do rememenber it isn't really hard.

Cheers,
Till

On Jan 17, 2008 3:32 PM, Oliver Bandel <oliver@first.in-berlin.de> wrote:
> Hello,
>
> how can I give back a pair of values (in my case both are
> int's) from C to OCaml?
>
> Didn't found something in the docs so far.
>
> TIA,
>    Oliver
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>



-- 
http://till-varoquaux.blogspot.com/