mikroC
making it simple...
Binary Constants
mikroC - C Compiler for Microchip PIC microcontrollers
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
short.
Octal Constants
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 suf- fixes, 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.
Floating Point ConstantsA
-Decimal integer,
-Decimal point,
-Decimal fraction,
-e or E and a signed integer exponent (optional),
-Type suffix: f or F or l or L (optional).
You can omit either the decimal integer or the decimal fraction (but not both). You can omit either the decimal point or the letter e (or E) and the signed integer exponent (but not both). These rules allow for conventional and scientific (exponent) notations.
Negative floating constants are taken as positive constants with the unary operator minus
mikroC limits
mikroC
|
| page |
MikroElektronika: Development tools - Books - Compilers | 41 | |
|