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