{十六进值字符串转换成LongInt值} function HexStrToInt(S: String): LongInt; var I: Integer; begin Result := 0; for I := 1 to Length(S) do begin if S[I] in ['0'..'9'] then Result := Result * 16 + (Integer(S[I]) - 48) else if S[I] in ['A'..'F'] then Result := Result * 16 + (Ord(S[I]) - 55); end; end;
function HexStrToInt(S: String): LongInt;
var
I: Integer;
begin
Result := 0;
for I := 1 to Length(S) do
begin
if S[I] in ['0'..'9'] then
Result := Result * 16 + (Integer(S[I]) - 48)
else if S[I] in ['A'..'F'] then
Result := Result * 16 + (Ord(S[I]) - 55);
end;
end;