var b: Byte; s: string;begin s := '31'; //16进制字符串 b := StrToInt('$' + s);end;
不过要注意一点,如果在程序调试时想看b的值,看到的将会是10进制的值