Datasheet
STATEMENTS
Statements specify a flow of control as the program executes. In the absence of
specific jump and selection statements, statements are executed sequentially in
the order of appearance in the source code.
Statements can be roughly divided into:
- Labeled Statements
- Expression Statements
- Selection Statements
- Iteration Statements (Loops)
- Jump Statements
- Compound Statements (Blocks)
Labeled Statements
Each statement in a program can be labeled. A label is an identifier added before
the statement like this:
label_identifier: statement;
There is no special declaration of a label – it just “tags” the statement.
Label_identifier has a function scope and the same label cannot be redefined
within the same function.
Labels have their own namespace: label identifier can match any other identifier in
the program.
A statement can be labeled for two reasons:
1.The label identifier serves as a target for the unconditional goto statement,
2.The label identifier serves as a target for the switch statement. For this
purpose, only
case and default labeled statements are used:
case constant-expression : statement
default : statement
208
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroC PRO for AVR
CHAPTER 5