M
modula-2
Unregistered / Unconfirmed
GUEST, unregistred user!
function HexToInt(hex: char): integer;
begin
case hex of
'0': result := 0;
'1': result := 1;
'2': result := 2;
'3': result := 3;
'4': result := 4;
'5': result := 5;
'6': result := 6;
'7': result := 7;
'8': result := 8;
'9': result := 9;
'A': result := 10;
'B': result := 11;
'C': result := 12;
'D': result := 13;
'E': result := 14;
'F': result := 15;
else
result := 0
end;
end;
begin
case hex of
'0': result := 0;
'1': result := 1;
'2': result := 2;
'3': result := 3;
'4': result := 4;
'5': result := 5;
'6': result := 6;
'7': result := 7;
'8': result := 8;
'9': result := 9;
'A': result := 10;
'B': result := 11;
'C': result := 12;
'D': result := 13;
'E': result := 14;
'F': result := 15;
else
result := 0
end;
end;