(Or case stATement, multi-way branch) A construct found in most high-level languages for selecting one of several possible blocks of code or branch destinATions depending on the value of an expression. An example in C is switch (foo(x, y)) { case 1: printf("Hello
") /* fall through */ case 2: printf("Goodbye
") break case 3: printf("Fish
") break default: fprintf(stderr, "Odd foo value
") exit(1) } The break stATements cause execution to continue after the whole switch stATemetnt. The lack of a break stATement after the first case means thAT execution will fall through into the second case. Since this is a common programming error you should add a comment if it is intentional. If none of the explicit cases mATches the expression value then the (optional) default case is taken. A similar construct in some functional languages returns the value of one of several expressions selected according to the value of the first expression. A distant relATion to the modern switch stATement is Fortran' s computed goto. (1997-01-30)