[Up] [Contents] [Index] [Summary]

2.12.1.2 Syntax for Non-Decimal Numbers

SWI-Prolog implements both Edinburgh and ISO representations for non-decimal numbers. According to Edinburgh syntax, such numbers are written as <radix>'<number>, where <radix> is a number between 2 and 36. ISO defines binary, octal and hexadecimal numbers using 0[bxo]<number>. For example: A is 0b100 \/ 0xf00 is a valid expression. Such numbers are always unsigned.