GOOC - Game Oriented Object C
GOOC - Game Oriented Object C
5.3.1. Integer Constants
5.3.1. Integer Constants
An integer constant is a sequence of digits, with an optional prefix to denote its number base.
If the sequence of digits is preceded by 0x or 0X, then the constant is considered to be hexadecimal. Hexadecimal values may use the digits 0 to 9, and the letters a to f or A to F. The following are all valid hexadecimal constants:
0x1f
0x200
0x04A
0xbf0
0xDe0
0x8
If a sequence of digits is preceded by 0b or 0B, then the constant is considered to be binary. Binary values may use the digits 0 and 1. The following are all valid binary constants:
0b0110
0b11
0b11110
In any other case, the sequence of digits is assumed to be decimal. Decimal values may use the digits 0 to 9.