9.1.2. Number Literals

Integers are represented as a sequence of digits. Floats use "." as a decimal separator. Either type of number may be preceded by "-" or "+" to indicate a negative or positive value, respectively

Examples of valid integers:


Examples of valid floating-point numbers:


An integer may be used in a floating-point context; it is interpreted as the equivalent floating-point number.

Spec-Zone.ru - all specs in one place