Im Using Delphi 5 and found a bit of code on the net
Code:
function HexToInt(W: PWord): Byte;
var
B, C: Byte;
begin
B := Lo(W^) - Ord('0');
if B > 9 then Dec(B, 7);
C := Hi(W^) - Ord('0');
if C > 9 then Dec(C, 7);
Result := B shl 4 + C;
end;
Error:
Undeclared Indentifier: 'PWord' and
Pointer Type Required for line - B := Lo(W^) - Ord('0');
Unfortunately i can't get the code to compile,my errors are above.
Can anyone help??
Thanks
Code:
function HexToInt(W: PWord): Byte;
var
B, C: Byte;
begin
B := Lo(W^) - Ord('0');
if B > 9 then Dec(B, 7);
C := Hi(W^) - Ord('0');
if C > 9 then Dec(C, 7);
Result := B shl 4 + C;
end;
Error:
Undeclared Indentifier: 'PWord' and
Pointer Type Required for line - B := Lo(W^) - Ord('0');
Unfortunately i can't get the code to compile,my errors are above.
Can anyone help??
Thanks