5.4.6. Integer Constants

[Tip]Description

Integer constants can be represented as octal, decimal or hexadecimal constants.

[Important]Syntax
IntConstantAST ::= DecimalIntegerLiteral | IntegerLiteral

The different representations of integers are differentiated by their first characters, which is followed by the possible numerical characters:

  • an octal integer

    • starts with a 0character that is followed by an octal digit,

    • can contain the 0.. 7characters;

  • a decimal integer

    • starts with a positive digit (1..9),

    • can contain the 0..9 characters;

  • a hexadecimal integer

    • starts with a 0 character that is followed by a small or large X (x/ X),

    • can contain the 0..9, a..f, A..F characters.

Each representation of an integer can have three different types related to the internal representation:

  • normal (there is no type modifier at the end of the number),

  • unsigned (there is a uor Ucharacter at the end of the number),

  • long (there is an lor Lcharacter at the end of the number).

Defined In:  ASM constant

Used By:  arity