用$00000000 表示16进值数职比如$0000FF08IntToHexUnitSysUtilsfunction IntToHex(Value: Integer; Digits: Integer): string; overload; function IntToHex(Value: Int64; Digits: Integer): string; overload;DescriptionIntToHex converts a number into a string containing the number's hexadecimal (base 16) representation. Value is the number to convert. Digits indicates the minimum number of hexadecimal digits to return.
另外怎样把用户输的十六制转成十进制???????????????????????? 例如: 用户在 edit 控件输入了 FA 的十六进制数,如何转成十进制????????????
用户在 edit 控件输入了 FA 的十六进制数,转成十进制 就这样 i := StrToInt('$'+Edit1.text);
str1:=Format('%2x',[i]); //0A
function IntToHex(Value: Int64; Digits: Integer): string; overload;DescriptionIntToHex converts a number into a string containing the number's hexadecimal (base 16) representation. Value is the number to convert. Digits indicates the minimum number of hexadecimal digits to return.
例如: 用户在 edit 控件输入了 FA 的十六进制数,如何转成十进制????????????
就这样
i := StrToInt('$'+Edit1.text);