mikroC

mikroC - C Compiler for Microchip PIC microcontrollers

making it simple...

Semicolon

The 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, mikroC 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 Statements.

Colon

Use the colon (:) to indicate a labeled statement. For example:

start: x = 0;

...

goto start;

Labels are discussed in Labeled Statements.

Asterisk (Pointer Declaration)

The asterisk (*) in a declaration denotes the creation of a pointer to a type:

char *char_ptr; /* a pointer to char is declared */

You can also use the asterisk as an operator to either dereference a pointer or as the multiplication operator:

i = *char_ptr;

For more information, see Pointers.

page

 

50

MikroElektronika: Development tools - Books - Compilers