Oppolzer - Informatik / Stanford Pascal Compiler


Home       Lebenslauf       Schwerpunkte       Kenntnisse       Seminare       Kunden       Projekte       Produkte       Blog       Stanford Pascal       Kontakt

The Stanford Pascal Compiler / Evolution Steps

Back to Compiler main page

Binary integer constants

Compiler version: 10.2017

With the new scanner, it was easy to add support for binary integer constants.

Integer constants may now be coded

- in normal decimal notation (12345)
- in hexadecimal notation (0x1afe)
- or in binary notation (0b1001_0001)

With all three notations, it is possible to add underscores to separate digit groups (to improve readability). The underscores have no meaning.

Underscores are allowed only between digits, not at the end or at the beginning. And only one underscore is allowed between two digits, not more than one.

123_456_789 is a legal integer constant; 11__23 and _45 are both illegal.

Back to Compiler main page