mikroC
making it simple...
CONSTANTS
Constants or literals are tokens representing fixed numeric or character values.
mikroC supports:
- integer constants,
- floating point constants,
- character constants,
- string constants (strings literals),
- enumeration constants.
The data type of a constant is deduced by the compiler using such clues as numer-
ic value and the format used in the source code.
Integer Constants
Integer constants can be decimal (base 10), hexadecimal (base 16), binary (base
2), or octal (base 8). In the absence of any overriding suffixes, the data type of an
integer constant is derived from its value.
Long and Unsigned Suffixes
The suffix
as a
can use both
, etc.
UL
In the absence of any suffix (
the following types that can accommodate its value:
int
MikroElektronika: Development tools - Books - Compilers
(or
) attached to any constant forces the constant to be represented
L
l
. Similarly, the suffix
long
and
suffixes on the same constant in any order or case:
L
U
,
,
unsigned int
long int
mikroC - C Compiler for Microchip PIC microcontrollers
(or
) forces the constant to be
U
u
,
,
, or
), constant is assigned the "smallest" of
U
u
L
l
,
unsigned long int
unsigned
,
ul
,
short
unsigned short
.
. You
,
Lu
,
page
39
Need help?
Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?