Mikroelektronika MIKROE-738 Datenbogen
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
180
mikoC PRO for PIC32
MikroElektronika
In the absence of any overriding suffixes, the data type of a decimal constant is derived from its value, as shown
below:
Value Assigned to Constant
Assumed Type
< -2147483648
Error: Out of range!
-2147483648 – -32769
long
-32768 – -129
int
-128 – 127
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
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
.
Binary
All constants starting with
0b
(or
0B
) are taken to be binary. In the absence of any overriding suffixes, the data type
of an binary constant is derived from its value, according to the rules presented above. For example,
0b11101
will be
treated as s
hort
.
Octal
All constants with an initial zero are taken to be octal. If an octal constant contains the illegal digits 8 or 9, an error
is reported. In the absence of any overriding suffixes, the data type of an octal constant is derived from its value,
according to the rules presented above. For example,
0777
will be treated as
int
.