ex5.pp 382 B

123456789101112131415161718
  1. Program Example5;
  2. { Program to demonstrate the Assign function. }
  3. Var F : text;
  4. begin
  5. Assign (F,'');
  6. Rewrite (f);
  7. { The following can be put in any file by redirecting it
  8. from the command line.}
  9. Writeln (f,'This goes to standard output !');
  10. Close (f);
  11. Assign (F,'Test.txt');
  12. rewrite (f);
  13. writeln (f,'This doesn''t go to standard output !');
  14. close (f);
  15. end.