switch(object)
{
case(bar):
// only bar
bar.fooiffize();
case(cookie):
// cookie is a foo!
fall(bar,tar,foo); // fall to the statement matching that (which can only ever be one anyway)
case(tar):
// only tar
tar.fooiffize();
case(foo2):
fall; // fall to the statement directly below
case(bar,tar,foo):
// bar tar cookie foo2 and foo
printf("object is a foo");
}
switch(sillyCenum)
{
case(keyf): fall;
case(keyk): fall;
case(keyn): fall;
case(keyz):
handleKey(sillyCenum);
// OR
case(keyf,keyk,keyn,keyz):
handleKey(sillyCenum);
default:
//whatever wasn't matched by any of the former
}