From the Ocaml documentation found at
http://caml.inria.fr/pub/docs/manual-ocaml/libr
ef/Pervasives.html
<blockquote>
val output_binary_int : out_channel -> 'a -> unit
Write one integer in binary format (4 bytes, big-endian) on
the given
output channel. The given integer is taken modulo 2^32. The
only
reliable way to read it back is through the input_binary_int
function.
The format is compatible across all machines for a given
version of
Objective Caml.
</blockquote>
As for serialization, you could roll-your-own serialization
format
that would be compatible with any language you wanted.
However, the
native Marshal serialization doesn't have foreign-function
interfaces
or libraries to access the format from C/C++ (though there
may be
third party libraries that do this). If you were clever and
had the
time, you could probably write something to do this using
C-callbacks
and some such, but that would not be a very high performance
solution.
HTH.
-jbs
Archives up to August 22, 2005 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/
The archives of the very official ocaml list (the seniors'
one) can be found at http://caml.inria.fr
Attachments are banned and you're asked to be polite, avoid
flames etc.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http:/
/groups.yahoo.com/group/ocaml_beginners/
<*> To unsubscribe from this group, send an email to:
ocaml_beginners-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.c
om/info/terms/
|