var frmMain: TfrmMain; type TUser = record usercode: string; username: string; usertel: string; end; implementation {$R *.dfm} // 测试 procedure TfrmMain.btnTestClick(Sender: TObject); var user: TUser; begin try user.usercode:= '9001'; user.username:= 'jzh'; user.usertel:= '159'; mmLine.Lines.Add(user.usercode); mmLine.Lines.Add(user.username); mmLine.Lines.Add(user.usertel); finally end; end;