Punctuators - mikroElektronika PIC Microcontrollers PIC12 User Manual

Mikroc user's manual
Table of Contents

Advertisement

mikroC - C Compiler for Microchip PIC microcontrollers

PUNCTUATORS

The mikroC punctuators (also known as separators) include brackets, parentheses,
braces, comma, semicolon, colon, asterisk, equal sign, and pound sign. Most of
these punctuators also function as operators.
Brackets
Brackets
char ch, str[] = "mikro";
int mat[3][4];
ch = str[3];
Parentheses
Parentheses
and indicate function calls and function parameters:
d = c * (a + b);
if (d == z) ++x;
func();
void func2(int n);
Parentheses are recommended in macro definitions to avoid potential precedence
problems during expansion:
#define CUBE(x) ((x)*(x)*(x))
For more information, refer to Expressions and Operators Precedence.
page
48
indicate single and multidimensional array subscripts:
[ ]
/* 3 x 4 matrix */
/* 4th element */
are used to group expressions, isolate conditional expressions,
( )
/* override normal precedence */
/* essential with conditional statement */
/* function call, no args */
/* function declaration with parameters */
MikroElektronika: Development tools - Books - Compilers
mikroC
making it simple...

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