English
Language : 

CC78K0S Datasheet, PDF (119/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 6 CONTROL STRUCTURES OF C LANGUAGE
6.4 Selection Statements
Selection statements include if and switch statements. The if or switch statement allows the program to choose
one of several groups of statements to execute, based on the value of the control expression enclosed in
parentheses.
The control flows of the if and switch statements are illustrated in Figure 6-1 below.
Figure 6-1. Control Flows of Selection Statements
Control flow of if statement
if
condition
True
False
Executes
statement
that follows
if.
Executes
statement
that follows
else.
Control flow of switch statement
switch
case 1
case 2
case 3
...
default :
User’s Manual U14872EJ1V0UM
119