ex31.pp 287 B

123456789101112131415
  1. program Example31;
  2. { Program to demonstrate the Dup function. }
  3. uses linux;
  4. var f : text;
  5. begin
  6. if not dup (output,f) then
  7. Writeln ('Dup Failed !');
  8. writeln ('This is written to stdout.');
  9. writeln (f,'This is written to the dup file, and flushed');flush(f);
  10. writeln
  11. end.