Integer literals possess two varying properties: their types, which can be specified with suffixes like L
or UL
, and their radices (called "forms" in the documentation), which can be specified with prefixes like 0x
and now 0b
.
Specifying a type was always done through a suffix, and specifying a radix was always done through a prefix, so it makes sense to keep the same convention. In addition, you can combine both specifiers.
For instance:
0b00101010UL
Would denote the literal 42
, stored as an unsigned long, and expressed in radix 2.