Abl-electronic PIC Microcontrollers PIC16 User Manual Page 56

  • Download
  • Add to my manuals
  • Print
  • Page
    / 312
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 55
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 [ ] indicate single and multidimensional array subscripts:
char ch, str[] = "mikro";
int mat[3][4];
/* 3 x 4 matrix */
ch = str[3];
/* 4th element */
Parentheses
Parentheses ( ) are used to group expressions, isolate conditional expressions,
and indicate function calls and function parameters:
d = c * (a + b);
/* override normal precedence */
if (d == z) ++x;
/* essential with conditional statement */
func();
/* function call, no args */
void func2(int n);
/* function declaration with parameters */
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.
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
48
MikroElektronika:
Development
tools
-
Books
-
Compilers
page
PUNCTUATORS
Page view 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 311 312

Comments to this Manuals

No comments