R reallycamera Unregistered / Unconfirmed GUEST, unregistred user! 2006-03-01 #1 请问delphi中如何将数字转换为字母,比如输入1时得到a,输入26得到z!
J jennykiller Unregistered / Unconfirmed GUEST, unregistred user! 2006-03-01 #2 var<br> i:integer;<br>begin<br> i := StrToInt(Edit1.Text);<br> ShowMessage(chr(ord('a')+i-1));<br>end;
var<br> i:integer;<br>begin<br> i := StrToInt(Edit1.Text);<br> ShowMessage(chr(ord('a')+i-1));<br>end;
W watermelon123 Unregistered / Unconfirmed GUEST, unregistred user! 2006-03-01 #4 char(#65) 输出A<br>char(#97) 输出a<br>数字前加#,数字就是字母在ASCII表中对应的编号<br>你去查查ASCII表就行了