Explorar o código

+ Example did not close open files

michael %!s(int64=27) %!d(string=hai) anos
pai
achega
ba17acc6a8
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      docs/refex/ex6.pp

+ 2 - 0
docs/refex/ex6.pp

@@ -20,4 +20,6 @@ begin
   Until (NumRead=0) or (NumWritten<>NumRead);
   Until (NumRead=0) or (NumWritten<>NumRead);
   Write ('Copied ',Total,' bytes from file ',paramstr(1));
   Write ('Copied ',Total,' bytes from file ',paramstr(1));
   Writeln (' to file ',paramstr(2));
   Writeln (' to file ',paramstr(2));
+  close(fin);
+  close(fout);
 end.
 end.