procedure TfrmMain.btnTestClick(Sender: TObject); var name: String; age: Integer; i : Integer; begin try name := 'jzh'; age := 22; mmLine.Text := name + IntToStr(age); for i := 0 to 5 do begin mmLine.Lines.Add(IntToStr(i)); end; if name = 'jzh' then begin mmLine.Lines.Add('hi, ' + name); end; finally end; end;