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


On Jan 17, 2008 3:32 PM, Oliver Bandel <> 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:
> Archives:
> Beginner's list:
> Bug reports: