W
wlyft
Unregistered / Unconfirmed
GUEST, unregistred user!
把edit1.text里的内容如AAAA转为65656565这种型式,使用以下方法不行,而且死机!
应怎么写?
var
s1,s2:string;
wlya:array[1..9] of pchar;
i1,i2:integer;
begin
s1:=edit1.text;
i1:=length(s1);
for i2:=1 to i1 do
begin
strcopy(wlya[i2],pchar(copy(s1,i2,1)));
s2:=s2+inttostr(integer(wlya[i2])))
end;
end;
应怎么写?
var
s1,s2:string;
wlya:array[1..9] of pchar;
i1,i2:integer;
begin
s1:=edit1.text;
i1:=length(s1);
for i2:=1 to i1 do
begin
strcopy(wlya[i2],pchar(copy(s1,i2,1)));
s2:=s2+inttostr(integer(wlya[i2])))
end;
end;