home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / c / c_tutor / c_2 / special < prev    next >
Encoding:
Text File  |  1992-11-14  |  714 b   |  28 lines

  1. #include "stdio.h"
  2.  
  3. main()
  4. {
  5. int index;
  6.  
  7.    for (index = 0;index < 6;index++) {
  8.       printf("This line goes to the standard output.\n");
  9.       fprintf(stderr,"This line goes to the error device.\n");
  10.    }
  11.  
  12.    exit(4);  /* This can be tested with the DOS errorlevel
  13.                 command in a batch file. The number returned
  14.                 is used as follows;
  15.  
  16.                 IF ERRORLEVEL 4 GOTO FOUR
  17.                 (continue here if less than 4)
  18.                 .
  19.                 .
  20.                 GOTO DONE
  21.                 :FOUR
  22.                 (continue here if 4 or greater)
  23.                 .
  24.                 .
  25.                 :DONE
  26.                                                                   */
  27. }
  28.