Datasheet

Braces
Braces { } indicate the start and end of a compound statement:
if (d == z) {
++x;
func();
}
Closing brace serves as a terminator for the compound statement, so a semicolon
is not required after
}, except in structure declarations. Sometimes, the semicolon
can be illegal, as in
if (statement)
{ ... }; /* illegal semicolon! */
else
{ ... };
For more information, refer to the Compound Statements.
Comma
Comma (,) separates the elements of a function argument list:
void func(int n, float f, char ch);
Comma is also used as an operator in comma expressions. Mixing two uses of
comma is legal, but you must use parentheses to distinguish them. Note that (exp1,
exp2) evalutates both but is equal to the second:
func(i, j); /* call func with two args */
func((exp1, exp2), (exp3, exp4, exp5)); /* also calls func with two
args! */
Semicolon
Semicolon (;) is a statement terminator. Any legal C expression (including the empty
expression) followed by a semicolon is interpreted as a statement, known as an
expression statement. The expression is evaluated and its value is discarded. If the
expression statement has no side effects, the mikroC PRO for AVR might ignore it.
a + b; /* Evaluate a + b, but discard value */
++a; /* Side effect on a, but discard value of ++a */
; /* Empty expression, or a null statement */
139
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroC PRO for AVR
CHAPTER 5