Extension: hexadecimal floating point constants


double d = 0x1p10;

Syntax & Semantics

Hexadecimal floating point constants begin with 0x and use p with a binary exponent. The number n following p is written in decimal, but it means "times 2^n" instead of the traditional "times 10^n".

The example initializes d to 1024.

This syntax was introduced in C99.


Not implemented.

Would need to introduce new lexical type, possibly extending compile but probably extending a lexing function.