User manual
mikroC PRO for dsPIC
MikroElektronika
193
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 dsPIC30/33 and PIC24 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 */
Semicolons are sometimes used to create an empty statement:
for (i = 0; i < n; i++);
For more information, see the Statements.
Colon
Use colon (:) to indicate the labeled statement:
start: x = 0;
...
goto start;
Labels are discussed in the Labeled Statements.
Asterisk (Pointer Declaration)
Asterisk (*) in a variable declaration denotes the creation of a pointer to a type:
char *char_ptr; /* a pointer to char is declared */
Pointers with multiple levels of indirection can be declared by indicating a pertinent number of asterisks:
int **int_ptr; /* a pointer to an array of integers */
double ***double_ptr; /* a pointer to a matrix of doubles */
You can also use asterisk as an operator to either dereference a pointer or as multiplication operator:
i = *int_ptr;
a = b * 3.14;
For more information, see the Pointers.