mikroElektronika PIC Microcontrollers PIC12 User Manual page 48

Mikroc user's manual
Table of Contents

Advertisement

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

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents