English
Language : 

CC78K4 Datasheet, PDF (110/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 6 CONTROL STRUCTURES OF C LANGUAGE
Labeled Statements
case label
EXAMPLE 2
int i ;
void main (void) {
/* ... */
i=2;
switch(i) {
case 1:
i=i+4;
case 2:
i=i+3;
case 3:
i=i+2;
}
/* ... */
}
EXPLANATION
In example 2, the processing starts in the second case statement since i is 2. The third statement is also
consecutively performed since the case statement does not include a break statement. Thus, if the constant
expression and the control expression in the case statement match, the programs thereafter are performed
sequentially. A break statement is used to exit the switch statement.
110
User’s Manual U15556EJ1V0UM