mikroElektronika PIC Microcontrollers PIC12 User Manual page 57

Mikroc user's manual
Table of Contents

Advertisement

mikroC
making it simple...
Braces
Braces
if (d == z) {
++x;
func();
}
The closing brace serves as a terminator for the compound statement, so a semi-
colon is not required after the }, except in structure declarations. Often, the semi-
colon is illegal, as in
if (statement)
else
For more information, refer to Compound Statements.
Comma
The comma (
void func(int n, float f, char ch);
The comma is also used as an operator in comma expressions. Mixing the two
uses of comma is legal, but you must use parentheses to distinguish them. Note
that (
/* call func with two args */
func(i, j);
/* also calls func with two args! */
func((exp1, exp2), (exp3, exp4, exp5));
MikroElektronika: Development tools - Books - Compilers
indicate the start and end of a compound statement:
{ }
{ ... };
/* illegal semicolon! */
{ ... };
) separates the elements of a function argument list:
,
) evalutates both but is equal to the second:
exp1
exp2
,
mikroC - C Compiler for Microchip PIC microcontrollers
page
49

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents