type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
i,j:integer;
s1:Array[0..20] of char;
s2:String;
//cchar;
begin
i:=length(trim(Edit1.text));
for j:=1 to i do
begin
s1[j]:=trim(Edit1.text)[j];
s2:=s2+intToStr(ord(s1[j]));
end;
edit2.text:=s2;
end;