English
Language : 

CC78K4 Datasheet, PDF (116/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 6 CONTROL STRUCTURES OF C LANGUAGE
6.5 Iteration Statements
An iteration statement executes a group of statements in the loop body as long as the value of the control
expression enclosed in parentheses is True (nonzero). C has the following three types of iteration statements.
• while statement
• do statement
• for statement
The control flow of each type of iteration statement is illustrated in Figure 6-2 below.
Figure 6-2. Control Flows of Iteration Statements
Control flow of while loop
Loop
while
condition
False
True
Executes
statement (s)
that follow
while.
Control flow of do-while loop
Loop
Loop
Control flow of for loop
Initialize
Executes
statement (s)
that follow
do.
for
condition
False
True
while
condition
False
True
Executes
statement (s)
that follow
for.
Reevaluates
control
expression.
116
User’s Manual U15556EJ1V0UM