while not EOF(f1) and not (codigofactura=a) do begin Readln(f1, ch1); a:= ch1; a:=Copy(a,86,93); a:= copy(a,1,8); ...