张志峰的博客

水滴石川,积少成多。

导航

var
b: Byte;
s: string;
begin
s := '31'; //16进制字符串
b := StrToInt('$' + s);
end;

不过要注意一点,如果在程序调试时想看b的值,看到的将会是10进制的值