From: Fergal Moran
> Yes, the values in PDB files are big endian.  An offset of 0x0000012c
> would be stored 00 00 01 2c, as opposed to 2c 01 00 00.  An easy way to
> Endian swap in VB is to read 1 byte at a time and use math:

> l = <read 1 byte>
> l = l * 256
> l = l + <read 1 byte>
> l = l * 256
> l = l + <read 1 byte>
> l = l * 256
> l = l + <read 1 byte>

> In C (and maybe VB) you can make the * 256 much faster by bit shifting
> (l <<= 8).
Or you could use htonl() and htons() which convert longs and shorts from
little to big endian

.F.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to