Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- data: Integer; // int -> Integer
- m_Strtag: string; // m_Strtag is CString, I guess
- sz: array[0..3] of Byte; // unsigned char sz[4] -> array[0..3] of Byte
- begin
- data := StrToInt(m_Strtag); // _ttoi -> StrToInt
- FillChar(sz, 4, 0); // memset(sz, 0, 4) -> no direct equivalent; the same with different param. order does e.g. FillChar
- sz[0] := (data shr 24) and $FF; // (data >> 24) & 0xFF
- sz[1] := (data shr 16) and $FF; // (data >> 16) & 0xFF
- sz[2] := (data shr 8) and $FF; // (data >> 8) & 0xFF
- sz[3] := data and $FF; // data & 0xFF
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement