var Ts:TstringList; begin ts:=Tstringlist.create; i:=inttostr(edit1.text); case i of 1:ts.add('ПРИВЕТ'); 2:ts.add('ПОКА'); end; ts.savetofile('c:\file.txt'); ts.free; end;