From: Michal Moskal <malekith@pld-linux.org>
To: Animesh Pathak <animesh.pathak@inria.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] help regarding 'union'
Date: Tue, 28 May 2002 12:26:01 +0200 [thread overview]
Message-ID: <20020528102601.GB30829@ep09.kernel.pl> (raw)
In-Reply-To: <200205280752.g4S7qsL08663@payia.inria.fr>
On Tue, May 28, 2002 at 09:52:54AM +0200, Animesh Pathak wrote:
> dear members,
> I am new to caml and am currently trying to write a program which involves
> sending of data across a network connection. What I have to do is to send a
> complex structure (containing lists of integers, mutexes etc. ) across a
> network. In C, i would have used a 'union' with a char array and sent the
> array... how is it done in caml?
> Kindly help me regarding this problem of mine.
Look at module Marshal. You can convert any (well, non-cyclic)
datastructure to string and send it. However beware that marshalled
structures might be imcompatible between OCaml releases (they however
are compatible (unlike C union solution) between different machines).
--
: Michal Moskal ::::: malekith/at/pld-linux.org : GCS {C,UL}++++$ a? !tv
: PLD Linux ::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h
-------------------
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
next prev parent reply other threads:[~2002-05-28 11:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-28 7:52 Animesh Pathak
2002-05-28 10:26 ` Michal Moskal [this message]
2002-05-29 1:36 ` YAMAGATA yoriyuki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020528102601.GB30829@ep09.kernel.pl \
--to=malekith@pld-linux.org \
--cc=animesh.pathak@inria.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).