home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0210 - 0219 / ibm0210-0219 / ibm0213.tar / ibm0213 / HAM_W32.ZIP / SAMPLES / RCODE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-12  |  696 b   |  23 lines

  1. /***************************************************************************/
  2. /*                                                                                                    */
  3. /*                                                                                                    */
  4. /*                    Print & exit with the specified return code.                        */
  5. /*    Copyright (c) 1989-1992 by Hamilton Laboratories.  All rights reserved.    */
  6. /*                                                                                                    */
  7. /*                                                                                                    */
  8. /***************************************************************************/
  9.         
  10. #include <windows.h>
  11. #include <stdlib.h>
  12. #include <stdio.h>
  13.  
  14. void cdecl main ( int argc, char *argv[] )
  15.         {
  16.         unsigned return_code = 0;
  17.         if (argc > 1)
  18.             printf("%d\n", return_code = atoi(argv[1]));
  19.         else
  20.             printf("0\n");
  21.         ExitProcess(return_code);
  22.         }
  23.