function HexStrToInt(S: String): LongInt;
var
I: Integer;
begin
Result := 0;
for I := 1 to Length(S)do
begin
if S in ['0'..'9'] then
Result := Result * 16 + (Integer(S) - 48)
else
if S in ['A'..'F'] then
Result := Result * 16 + (Ord(S) - 55);
end;
end;
uses math
.
.
.
function Hex2Dec(Hex : string) : string;
var
i : integer;
res : real;
len : integer;
begin
len := length(Trim(Hex));
for i := 1 to lendo
begin
case Hex of
'0'..'9': res := res + strToInt(Hex) * power(16,(len-i));
'a'..'f': res := res + (ord(Hex) - ord('a') + 10) * power(16,(len-i));
'A'..'F': res := res + (ord(Hex) - ord('A') + 10) * power(16,(len-i));
end;
end;
result := FloatToStr(res);
end;