Dictionary    Maps    Thesaurus    Translate    Advanced >   


Tip: Click Thesaurus above for synonyms. Also, follow synonym links within the dictionary to find definitions from other sources.

1. The Free On-line Dictionary of Computing (30 December 2018)
switch statement
case statement
multi-way branch

    (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\n");	/* fall through */
   	case 2:  printf("Goodbye\n"); break;
   	case 3:  printf("Fish\n"); break;
   	default: fprintf(stderr, "Odd foo value\n"); 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)


Common Misspellings >
Most Popular Searches: Define Misanthrope, Define Pulchritudinous, Define Happy, Define Veracity, Define Cornucopia, Define Almuerzo, Define Atresic, Define URL, Definitions Of Words, Definition Of Get Up, Definition Of Quid Pro Quo, Definition Of Irreconcilable Differences, Definition Of Word, Synonyms of Repetitive, Synonym Dictionary, Synonym Antonyms. See our main index and map index for more details.

©2011-2024 ZebraWords.com - Define Yourself - The Search for Meanings and Meaning Means I Mean. All content subject to terms and conditions as set out here. Contact Us, peruse our Privacy Policy