Arduino Programming Language: SwitchCase

Name

switch

Description

Works like an if else structure, but is more conveniente when you need to select between three or more alternatives. Program controls jumps to the case with the same value as the expression. The break keyword exits the switch statement, and is typically used at the end of each case. Without it, the switch statement will continue executing the following expressions until a break, or the end of the switch statement is reached.