procedure TForm1.Button1Click(Sender: TObject); type myinfo = record name : string; age : Integer; addr : string; end; var info : myinfo; begin info.name:=‘longker‘; info.age :=29; info.addr:=‘GuiLin‘; end;
procedure TForm1.Button2Click(Sender: TObject); type myinfo = record name : string; age : Integer; addr : string; end; var info : myinfo; begin with info do begin name:=‘longker‘; age :=29; addr:=‘GuiLin‘; end; //Edit1.Text:=info.name; end;