Datasheet
EXPRESSION STATEMENTS
Any expression followed by a semicolon forms an expression statement:
expression;
The mikroC PRO for AVR executes an expression statement by evaluating the
expression. All side effects from this evaluation are completed before the next
statement starts executing. Most of expression statements are assignment state-
ments or function calls.
A null statement is a special case, consisting of a single semicolon (;). The null
statement does nothing, and therefore is useful in situations where the mikroC PRO
for AVR syntax expects a statement but the program does not need one. For exam-
ple, a null statement is commonly used in “empty” loops:
for (; *q++ = *p++ ;); /* body of this loop is a null statement */
SELECTION STATEMENTS
Selection or flow-control statements select one of alternative courses of action by
testing certain values. There are two types of selection statements:
- if
- switch
209
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroC PRO for AVR
CHAPTER 5