Browse thread
Reading 16 bit floats from stream?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Martin Jambon <martin1977@l...> |
| Subject: | Re: [Caml-list] Re: Reading 16 bit floats from stream? |
On Mon, 16 Oct 2006, Maurizio Colucci wrote: > I assume you mean four read_bytes calls... > > and make an int32 of >> them. > > > How do I create an int32 with four bytes? I can't recall any predefined function. You can read the bytes one by one, and use Int32.shift_left and Int32.logor to create the int32 value. > Then simply call Int32.float_of_bits. > > > I get this last one, but I can't imagine the previous step. > > Thanks > > Maurizio > -- Martin Jambon, PhD http://martin.jambon.free.fr