|
CC78K4 Datasheet, PDF (121/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language | |||
|
◁ |
CHAPTER 6 CONTROL STRUCTURES OF C LANGUAGE
(1) goto statement
Branch Statements
goto
FUNCTION
A goto statement causes program execution to unconditionally jump to the label name specified in the goto
statement within the current function.
SYNTAX
goto identifier ;
EXAMPLE
do {
/*...*/
goto point ;
/*...*/
}while(/*...*/) ;
/*...*/
point: ;
EXPLANATION
In the above example, when control is passed to the goto statement, C jumps out of the current do ... while loop
processing unconditionally and transfers control to the statement next to âpointâ.
NOTE
The label name (branch destination) to be specified in a goto statement must have been specified within the
current function that includes the goto statement. In other words, a goto can branch only within the current
function - not from one function to another.
Userâs Manual U15556EJ1V0UM
121
|
▷ |