1.6 Real Constant

Real constants can either be decimal or hexadecimal numbers. They may have an optional leading plus or minus sign. The components of a real constant are the integer part, a mantissa, and an exponent used to represent scientific notation.


Real Decimal Constant

The integer part and the mantissa consist of decimal digits and underscores. The integer part cannot have a leading underscore. All numeric constants cannot end with an underscore.

A decimal exponent begins with the letter 'E' or 'e' followed by an optional sign and a series of digits and underscores. The exponent multiplies the value by 10 to the power of the exponent.


Real Hexadecimal Constant

Real hexadecimal constants are used to generate a precise binary real value. The integer part and the mantissa consist of hexadecimal digits and underscores. The integer part cannot have a leading underscore and again, all numeric constants cannot end with an underscore.

A hexadecimal exponent begins with the letter 'E' or 'e' followed by an optional sign and a series of digits and underscores. The exponent multiplies the value by 2 to the power of the exponent.

Integer Constant

Quoted Text