From Delphi 11 onwards, digit separators _ can be used to split numeric literals into
groups.
To improve readability, this rule verifies that numeric literals above a configurable size in digits use separators.
Noncompliant code example
const
DecimalInt = 10000; // Noncompliant; more than 4 digits without separators
HexadecimalInt = $7FFFF; // Noncompliant; more than 4 digits without separators
BinaryInt = %01010; // Noncompliant; more than 4 digits without separators
Float = 10000.0; // Noncompliant; more than 4 (integer) digits without separators
Compliant code example
const
DecimalInt = 10_000;
HexadecimalInt = $7_FFFF;
BinaryInt = %0_10_10;
LongDecimalFloat = 10_000.0;
FloatWithAnySeps = 10.0_0_00_1;
FloatWithoutSeps = 10.00001;
Only the integer component of floating point numbers is checked for compliance; the fractional and exponent parts are ignored.
_ between groups.