User manual

184
mikoC PRO for dsPIC
MikroElektronika
Floating Point Constants
A oating-point constant consists of:
- Decimal integer
- Decimal point
- Decimal fraction
- e or E and a signed integer exponent (optional)
- Type sufx: f or F or l or L (optional)
Either decimal integer or decimal fraction (but not both) can be omitted. Either decimal point or letter e (or E) with
a signed integer exponent (but not both) can be omitted. These rules allow conventional and scientic (exponent)
notations.
Negative oating constants are taken as positive constants with an unary operator minus (-) prexed.
The mikroC PRO for dsPIC30/33 and PIC24 limits oating-point constants to the range ±1.17549435082 * 10-38 ..
±6.80564774407 * 1038.
Here are some examples:
0. // = 0.0
-1.23 // = -1.23
23.45e6 // = 23.45 * 10^6
2e-5 // = 2.0 * 10^-5
3E+10 // = 3.0 * 10^10
.09E34 // = 0.09 * 10^34
The mikroC PRO for dsPIC30/33 and PIC24 oating-point constants are of the type double. Note that the mikroC PRO
for dsPIC’s implementation of ANSI Standard considers oat and double (together with the long double variant)
to be the same type.
Character Constants
A character constant is one or more characters enclosed in single quotes, such as ‘A’, ‘+’, or ‘\n’. In the mikroC
PRO for dsPIC30/33 and PIC24, single-character constants are of the unsigned int type. Multi-character constants
are referred to as string constants or string literals. For more information refer to String Constants.
Escape Sequences
A backslash character (\) is used to introduce an escape sequence, which allows a visual representation of certain
nongraphic characters. One of the most common escape constants is the newline character (\n).
A backslash is used with octal or hexadecimal numbers to represent an ASCII symbol or control code corresponding
to that value; for example, \x3F’ for the question mark. Any value within legal range for data type char (0 to 0xFF
for the mikroC PRO for dsPIC30/33 and PIC24) can be used. Larger numbers will generate the compiler error “Out of
range”.