how to convert big-endian numbers to native numbers delphi
Posted
by steve0
on Stack Overflow
See other posts from Stack Overflow
or by steve0
Published on 2010-06-17T20:20:59Z
Indexed on
2010/06/17
21:03 UTC
Read the original article
Hit count: 185
delphi
hi all
i want to know how to convert big endian numbers to native numbers in delphi i am porting some c++ code in that i came accross this part
unsigned long blockLength = *blockLengthPtr++ << 24; blockLength |= *blockLengthPtr++ << 16; blockLength |= *blockLengthPtr++ << 8; blockLength |= *blockLengthPtr;
unsigned long dataLength = *dataLengthPtr++ << 24; dataLength |= *dataLengthPtr++ << 16; dataLength |= *dataLengthPtr++ << 8; dataLength |= *dataLengthPtr;
i am not familiar with c++ ,so i didnt understand what those operators doing
can any one help ?
regards
© Stack Overflow or respective owner