KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q44388: How to Use the ERROUT Utility

Article: Q44388
Product(s): See article
Version(s): 5.10   | 5.10
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | H_FORTRAN H_MASM docerr | mspl13_c
Last Modified: 19-SEP-1989

Question:

How do I use the ERROUT utility? Examples in the "Microsoft C 5.1
Optimizing Compiler/CodeView and Utilities" manual do not seem to
work.

Response:

ERROUT divides its output into two parts: the standard output and the
standard error output. If ERROUT is used without the /f switch, error
output is sent to standard output. (Normally, error output is sent to
the console regardless of where standard output is redirected.) The
printed documentation on ERROUT is in error on this point.

Therefore, you must use the ERROUT utility with DOS redirection
operators ">" or ">>", as in the following example:

   ERROUT /f err.doc cl test.c > std.doc

The file STD.DOC contains the standard output and the file ERR.DOC
contains the errors. If there is no error output, the file ERR.DOC
will be zero bytes long.

To send error output and standard output to the printer, use the
following commands:

   ERROUT cl test.c > PRN

To send error output to the printer and standard output to the
console, use the following commands:

   ERROUT /f PRN cl test.c

To send error output to the console and standard output to the
printer, use the following commands:

   cl test.c > PRN

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.