SWI-Prolog supports splitting long integers into digit groups. Digit groups can be separated with the sequence <underscore>, <optional white space>. If the <radix> is 10 or lower, they may also be separated with exactly one space. The following all express the integer 1 million:
1_000_000 1 000 000 1_000_/*more*/000
Integers can be printed using this notation with format/2,
~I format specifier. For example:
?- format('~I', ). 1_000_000
The current syntax has been proposed by Ulrich Neumerkel on the SWI-Prolog mailinglist.