D dafuwengqing Unregistered / Unconfirmed GUEST, unregistred user! 2005-03-22 #1 大侠们: test:string; test:='A' 现在想用i:=ASCII值(A) 这个应该怎么写???
D dafuwengqing Unregistered / Unconfirmed GUEST, unregistred user! 2005-03-22 #2 大侠们: test:string; test:='A' 现在想用i:=ASCII值(A) 这个应该怎么写???
A Avalon Unregistered / Unconfirmed GUEST, unregistred user! 2005-03-22 #4 procedure TForm1.Button1Click(Sender: TObject); var v_Str:String; i:Integer; v_ASC:String; begin v_Str:='222222222222'; for i := 0 to length(v_Str)-1 do v_ASC := v_ASC+IntToStr(Ord(v_Str)); ShowMessage(v_ASC); end;
procedure TForm1.Button1Click(Sender: TObject); var v_Str:String; i:Integer; v_ASC:String; begin v_Str:='222222222222'; for i := 0 to length(v_Str)-1 do v_ASC := v_ASC+IntToStr(Ord(v_Str)); ShowMessage(v_ASC); end;
O oiwin Unregistered / Unconfirmed GUEST, unregistred user! 2005-03-22 #6 大家说得都对, 还可以用ByteType函数来判断字符串是否是汉字
卡 卡布卡 Unregistered / Unconfirmed GUEST, unregistred user! 2005-03-29 #7 var I:integer=ord('A') //I值为65; C:char=chr(65) //C值为A; 就这样。。