procedure TForm1.Button1Click(Sender: TObject);
var
i,j:integer;
s:string;
begin
s:=Edit1.Text;
j:=10-length(Edit1.Text);
if j>0 then for i:=1 to j do s:=s+' ';
Edit1.Text:=s;
end;
procedure LEN(L: INTEGER);//L是长度
var
i,j:integer;
s:string;
begin
s:=TRIM(Edit1.Text);
j:=L-length(Edit1.Text);
if j>0 then for i:=1 to j do s:=s+' ';
Edit1.Text:=s;
end;