home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_08 / 8n08044a < prev    next >
Text File  |  1990-07-18  |  296b  |  20 lines

  1.  
  2. critical foo(int type)
  3. {
  4. switch(type)
  5.   {
  6.   case 1:
  7.   /*** Do work for type code 1 ***/
  8.   return(SUCCESS);
  9.  
  10.   case 2:
  11.   /*** Do work for type code 2 ***/
  12.   return(SUCCESS);
  13.  
  14.   default:
  15.   if(type > 5) return(ERROR);
  16.   /*** Do default work         ***/
  17.   return(SUCCESS);
  18.   }
  19. }
  20.