procedure CheckFile(var GdInput : boolean; OutPath : string; WhatFile : string; var OutFile : Data); begin gdinput := true; if Exist(Outpath+Whatfile) then begin ErrorWin('Append existing file: '+OutPath+WhatFile+'? Y/N ', YN); if YN in ['Y','y','+'] then begin assign (outfile,outpath+whatfile); append(OutFile); end else begin ErrorWin('Erase existing file: '+OutPath+WhatFile+'? Y/N ', YN); if YN in ['Y','y','+'] then begin assign(outfile,outpath+whatfile); erase(OutFile); {$I-} rewrite(OutFile); {$I+} end else GdInput := false; end; end {if exist...} else begin assign (Outfile, outpath+whatfile); {$I-} rewrite(OutFile); {$I+} if (ioresult <> 0) then begin Error('Bad filename! Re-enter the complete filename including path.'); GdInput := False; end; end; {else} YN := ' '; end;