var pdata: array of char; begin ... DecodeArray(pchar(pdata)^, boffset); ... end; procedure decodearray(pdata: array of Char; boffset: Int64); var ii: Integer; test: string; begin showmessage(inttostr((ord(pdata[34 + boffset])); end;