home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pascal / tplib21.zip / INSTALL.EXE / EXSTDERR.PAS < prev    next >
Pascal/Delphi Source File  |  1993-05-30  |  1KB  |  29 lines

  1. (* Example program: STDERR unit *)
  2.  
  3. PROGRAM EXSTDERR;
  4.  
  5. USES 
  6.   STDERR;
  7.  
  8.  
  9. BEGIN
  10.     WriteLn('EXSTDERR - STDERR UNIT EXAMPLE PROGRAM');
  11.     WriteLn;
  12.     WriteLn('This text is being sent to the standard output device.');
  13.     WriteLn('DOS allows redirection of standard output to any file');
  14.     WriteLn('or device by the ">" and "|" symbols on the command line.');
  15.     WriteLn;
  16.     WriteStdErr('This text, on the other hand, is being sent to the');
  17.     WriteStdErr('standard-error device, which is always the console.');
  18.     WriteStdErr('Text sent to the error device is not affected by any');
  19.     WriteStdErr('redirection.');
  20.     WriteLn;
  21.     WriteLn('We are now back to the standard output device.  Notice how');
  22.     WriteLn('all this text has appeared on the console display.  Try ');
  23.     WriteLn('running this program again, redirecting output to a file or');
  24.     WriteLn('your printer.  You should only see the middle paragraph of text');
  25.     WriteLn('appear on your console screen; the other text (including this)');
  26.     WriteLn('will be sent to the printer or disk file.');
  27. END.
  28.  
  29.