The real constants are used to specify floating-point numbers.
sign unsigned_number.unsigned_number
sign unsigned_number.unsigned_number e sign unsigned_number
sign unsigned_number.unsigned_number E sign unsigned_number
A real constant can be specified using only digits, underscores, decimal points and exponential symbols (e or E). It cannot be specified with size or base format. If a decimal point is provided then the real number should have at least one digit on both sides of a decimal point. Real numbers can be specified in the decimal notation (Example 1) or in the scientific notation (Example 2).
Example 1
17.5
0.5
1_000_000.0
Example 2
10e5
0.5694_e-5
The real constants cannot be specified with size or base format.
Powered by IXwebhosting |