Datasheet

is defined as
*((id) + (exp))
where either:
-
id is a pointer and exp is an integer, or
-
id is an integer and exp is a pointer.
The following statements are true:
&a[i] = a + i
a[i] = *(a + i)
According to these guidelines, it can be written:
pa = &a[4]; // pa points to a[4]
x = *(pa + 3); // x = a[7]
/* .. but: */
y = *pa + 3; // y = a[4] + 3
Also the care should be taken when using operator precedence:
*pa++; // Equal to *(pa++), increments the pointer
(*pa)++; // Increments the pointed object!
The following examples are also valid, but better avoid this syntax as it can make
the code really illegible:
(a + 1)[i] = 3;
// same as: *((a + 1) + i) = 3, i.e. a[i + 1] = 3
(i + 2)[a] = 0;
// same as: *((i + 2) + a) = 0, i.e. a[i + 2] = 0
Assignment and Comparison
The simple assignment operator (=) can be used to assign value of one pointer to
another if they are of the same type. If they are of different types, you must use a
typecast operator. Explicit type conversion is not necessary if one of the pointers is
generic (of the void type).
Assigning the integer constant 0 to a pointer assigns a null pointer value to it.
162
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroC PRO for AVR
CHAPTER 5