ex18.pp 422 B

12345678910111213141516171819202122
  1. Program Example18;
  2. { Program to demonstrate the Eof function. }
  3. Var T1,T2 : text;
  4. C : Char;
  5. begin
  6. { Set file to read from. Empty means from standard input.}
  7. assign (t1,paramstr(1));
  8. reset (t1);
  9. { Set file to write to. Empty means to standard output. }
  10. assign (t2,paramstr(2));
  11. rewrite (t2);
  12. While not eof(t1) do
  13. begin
  14. read (t1,C);
  15. write (t2,C);
  16. end;
  17. Close (t1);
  18. Close (t2);
  19. end.