H HellArchon Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-13 #1 请问如何把一个16进制表示的字符串转换为16进制数值所对应的字符? 例: stmp:='4d'; 如何转换为字符 'M'
C Cowboy Blues Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-13 #2 查ASCII基础。 Delphi SDK Help里头有2、8、16进制的例子。
M maozhuxi Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-13 #5 procedure TForm1.Button1Click(Sender: TObject); var stmp:string; begin stmp:='4d'; stmp:=chr($4d); edit1.text:=stmp; end;
procedure TForm1.Button1Click(Sender: TObject); var stmp:string; begin stmp:='4d'; stmp:=chr($4d); edit1.text:=stmp; end;
H HellArchon Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-13 #6 可否写个简单例子? StrToHex(),好象没这个函数啊?要加哪个单元么? chr($4d),如何用变量表示?'4d'是字符串。
H HellArchon Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-13 #7 stmp:='4d'; stmp:=chr($4d); 有这种写法么?@_@~
A apw Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-13 #8 给你个例子: var str: string; i: integer; begin str := ''; for i := $31 to $39 do str := str + chr(i); showmessage(str); end;
给你个例子: var str: string; i: integer; begin str := ''; for i := $31 to $39 do str := str + chr(i); showmessage(str); end;
H HellArchon Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-13 #9 Sorry啊!apw,我需要接受一个字符串,比如 '%43%3a%5c%57%49%4e%4e%54%5c' 其中%后面的2位字符是一个单字符的16进制表示 我需要把他们全部转换出来
Y yostgxf Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-13 #10 ShowMessage(Chr(StrToInt('$4d'))); var S:String; begin S:='$4d'; ShowMessage(Chr(StrToInt(S))); end;
M maozhuxi Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-13 #11 按照你的要求 procedure TForm1.Button1Click(Sender: TObject); var stmp:string; i:integer; begin stmp:='4d'; stmp:='$'+stmp ; i:=strToint(stmp); stmp:=chr(i); edit1.text:=stmp; end;
按照你的要求 procedure TForm1.Button1Click(Sender: TObject); var stmp:string; i:integer; begin stmp:='4d'; stmp:='$'+stmp ; i:=strToint(stmp); stmp:=chr(i); edit1.text:=stmp; end;
H HellArchon Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-13 #12 接受了,多谢maozhuxi,yotgxf 2位