Switch statement
In computer programming languages, a switch statement is a type of selection control mechanism used to allow the value of a variable or expression to change the control flow of program execution via search and map.

Switch statements function somewhat similarly to the codice_1 statement used in programming languages like C/C++, C#, Visual Basic .NET, Java and exists in most high-level imperative programming languages such as Pascal, Ada, C/C++, C#, Visual Basic .NET, Java, and in many other types of language, using such keywords as codice_2, codice_3, codice_4 or codice_5.

Switch statements come in two main variants: a structured switch, as in Pascal, which takes exactly one branch, and an unstructured switch, as in C, which functions as a type of goto. The main reasons for using a switch include improving clarity, by reducing otherwise repetitive coding, and (if the heuristics permit) also offering the potential for faster execution through easier compiler optimization in many cases.
Q9143
computer programming language
Concept
Q877977
variable
Concept
Q868299
control flow
Concept
Q15777
C
Concept
Q2407
C++
MEDIA
Q2370
C#
MEDIA
Q50077
Visual Basic .NET
MEDIA
Q251
Java
Concept
Q275596
imperative programming
Concept
Q81571
Pascal
Concept
Q154755
Ada
MEDIA
Q15777
C
Concept
Q2407
C++
MEDIA
Q2370
C#
MEDIA
Q50077
Visual Basic .NET
MEDIA
Q251
Java
Concept
Q1192029
keyword
Concept
Q750997
goto
Concept
Q201413
heuristic
Concept
Q1325106
compiler optimization
Concept
Q838092
Switch statement
Concept
Q838092
Switch statement
Concept
+1^^http://www.w3.org/2001/XMLSchema#decimal
1
NUMBER
+2^^http://www.w3.org/2001/XMLSchema#decimal
2
NUMBER
+3^^http://www.w3.org/2001/XMLSchema#decimal
3
NUMBER
+4^^http://www.w3.org/2001/XMLSchema#decimal
4
NUMBER
+5^^http://www.w3.org/2001/XMLSchema#decimal
5
NUMBER
programming paradigm
programming paradigm
programming paradigm
programming paradigm
programming paradigm
programming paradigm
programming paradigm
programming paradigm
programming paradigm
programming paradigm