首页 > TAG信息列表 > LongWord

Delphi 高低字节交换

内存中的字节顺序与网络传输的字节顺序是不一样的,用名词说就是大端存储和小端存储的区别,有时候就需要转换。 Delphi7不支持inline内联函数,可以把inline去掉。 function Swap16(const Value: Word): Word; inline; begin Result := Swap(Value); end; function Swap32(const Val