|
| mikroC | |
mikroC - C Compiler for Microchip PIC microcontrollers | making it simple... | ||
|
|
|
|
Otherwise:
If the constant has a U or u suffix, its data type will be the first of the following that can accommodate its value: unsigned short, unsigned int, unsigned
long int.
If the constant has an L or l suffix, its data type will be the first of the following that can accommodate its value: long int, unsigned long int.
If the constant has both U and L suffixes, (ul, lu, Ul, lU, uL, Lu, LU, or UL), its data type will be unsigned long int.
Decimal Constants
Decimal constants from
In the absence of any overriding suffixes, the data type of a decimal constant is derived from its value, as shown below:
< | Error: Out of range! |
long | |
int | |
short | |
128 .. 255 | unsigned short |
256 .. 32767 | int |
32768 .. 65535 | unsigned int |
65536 .. 2147483647 | long |
2147483648 .. 4294967295 | unsigned long |
> 4294967295 | Error: Out of range! |
Hexadecimal Constants
page
40
All constants starting with 0x (or 0X) are taken to be hexadecimal. In the absence of any overriding suffixes, the data type of an hexadecimal constant is derived from its value, according to the rules presented above. For example, 0xC367 will be treated as unsigned int.
MikroElektronika: Development tools - Books - Compilers