(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)