3.1 Numeric constants
----------------------
Numeric constants in decimal or hexadecimal formats (base 10 or 16) are
written the same as in C.
A number written in binary format (base 2) must begin with 0b, followed
directly by a sequence of zeroes and ones.
A number written in octal format (base 8) must begin with 0o, followed
directly by the numeric string.
A floating point number differs from an integer in having a decimal
point. It may begin with a numeral from 0 to 9 or a minus sign. This is
optionally followed (with no spaces) by the power of ten preceded by the
letter e or E.
Example:
0b11111111 // the binary notation of 255
0x00F // the hexadecimal notation for 15
0o10 // the octal notation for 8
1.234567E-20 // floating point number
Like Assembly language, C-- can handle hexadecimal numbers written with
h or H after the numeric characters. If the first character is greater
than 9 (i. e., the letters A-F) it must be preceded by 0. For example:
1234h
0A000H
Numeric constants may be followed by the suffixes L, U or F, which
are simply ignored by C--. For example:
#define DEF 1L
#define DEF2 2Lu
#define DEF3 3.0F
These suffixes can be written in lower and/or upper case.