[MLton-user] Raw conversion of 32 bits into Real32.t

Neal Glew neal at glew.name
Mon Jan 22 09:14:29 PST 2007

I have a 32-bit quantity and I want to get it at type Real32.t (as in
the following C code).  Is there a way to do this in the mlton

union {
  float f;
  int32 i;
} c;
c.i = <some value>
<now use c.f>

I want to do this in the context of unserialisation, so some
equivalent way to achieve the same thing would be fine.


More information about the MLton-user mailing list