[FRPythoneers] 24 bit number

Mike Romberg romberg at fsl.noaa.gov
Mon Feb 3 15:46:56 MST 2003

>>>>> " " == Rob Riggs <rob at pangalactic.org> writes:

     > You will also want to make sure that the sign bit is extended
     > (as needed) and that the byte ordering is correct.  If byte
     > ordering is incorrect (and if you are running on an ia32 or
     > other little-endian platform), you can use socket.ntohl() to
     > reorder the bytes.

  The struct module is also nice for adjusting byte ordering and
taking care of the signed bit.  I find it a bit more "self
documenting" than other approaches.

Mike Romberg (romberg at fsl.noaa.gov)

More information about the FRPythoneers mailing list