var i:Integer;
assignfile(outfile, 'outfile'+ IntToStr(i)+'.txt');
assignfile(outfile, format('outfile%d.txt',[i]));