English
Language : 

CC78K4 Datasheet, PDF (113/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 6 CONTROL STRUCTURES OF C LANGUAGE
6.4 Conditional Statements
Conditional (or selection) statements include the 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 if and switch statements are illustrated in Figure 6-1 below.
Figure 6-1. Control Flows of Conditional Statements
Control flow of switch statement
switch
case 1
case 2
case 3
default :
Control flow of if statement
if
condition
True
False
Executes
statement
that follows
if.
Executes
statement
that follows
else.
User’s Manual U15556EJ1V0UM
113