mikroC
making it simple...
mikroC - C Compiler for Microchip PIC microcontrollers
Enumeration constants are identifiers defined in enum type declarations. The identifiers are usually chosen as mnemonics to assist legibility. Enumeration constants are of int type. They can be used in any expression where integer constants are valid.
For example:
enum weekdays {SUN = 0, MON, TUE, WED, THU, FRI, SAT};
The identifiers (enumerators) used must be unique within the scope of the enum declaration. Negative initializers are allowed. See Enumerations for details of enum declarations.
Pointer ConstantsA pointer or the
A constant expression is an expression that always evaluates to a constant and consists only of constants (literals) or symbolic constants. It is evaluated at compile
Constant expressions can consist only of the following: literals, enumeration con- stants, 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.
You can use a constant expression anywhere that a constant is legal.
|
| page |
MikroElektronika: Development tools - Books - Compilers | 45 | |
|