Listing 2

func(int type)
{
switch(type)
  {
  case 1:
  /***  Do work for type code 1    ***/
  return(SUCCESS);
  case 2:
  critical
    {
    /***  Do critical type 2 work ***/
    }
  return(SUCCESS);
  default:
  if(type > 5) return(ERROR);
  /***  Do default work            ***/
  return(SUCCESS);
  }
}