User manual
188
mikoC PRO for dsPIC
MikroElektronika
Notes:
- Pointer to constant space (Flash memory) is allocated in RAM.
- Due to the previous note, it is not possible to dene an extern const.
- Constants of a simple type are not allocated in the Flash memory nor in RAM, but changed in the compile time, and
therefore, address of a such constant can not be obtained.
Constant Expressions
A constant expressions can be evaluated during translation rather that runtime and accordingly may be used in any
place that a constant may be.
Constant expressions can consist only of the following:
- literals,
- enumeration constants,
- simple constants (no constant arrays or structures),
- sizeof operators.
Constant expressions cannot contain any of the following operators, unless the operators are contained within the
operand of a sizeof operator: assignment, comma, decrement, function call, increment.
Each constant expression can evaluate to a constant that is in the range of representable values for its type.
Constant expression can be used anywhere a constant is legal.