convert 4 bytes into a long [message #2533] |
Thu, 28 July 1994 08:38 |
stl
Messages: 70 Registered: February 1994
|
Member |
|
|
Hello,
I am trying to find out if I can convert 4 byte value into 1 long value.
For example
b = byte(4)
set all their values to something, and convert this intire array into a
long value.
I presume this is possible, I just cannot think of how to do it and my
attempts fail one after another.
(the reason I am doing this is because I am returning data from external
C programs (in Shared Object libraries) and structures tend to get byte
padded, so I return a huge byte array. But now I got to pick out all
the numbers: doubles,floats, etc... Yes I now their position and order
exactly.)
thanks for any help,
-stephen
--
Stephen C Strebel / SKI TO DIE
strebel@sma.ch / and
Swiss Meteorological Institute, Zuerich / LIVE TO TELL ABOUT IT
01 256 93 85 / (and pray for snow)
|
|
|