A literal is a value written as it is in the program. Numeric literals come in two kinds:
Integers: only digits, such as 0, 42 or 2026.
Reals: digits, a point and more digits, such as 3.14 or 0.5. The separator is always the point, not the comma, and there must be at least one digit on each side.
Figure 2.6-1.What is read as an integer, what as a real and what is not a number.
Three rows. Integers: 0, 42 and 2026. Reals: 3.14, 0.5 and 100.0. Not numbers: point 5, 5 point, 3 comma 5, scientific notation and 1 underscore 000.
The minus sign is not part of the literal: -5 is the minus operator applied to 5.