aboutsummaryrefslogtreecommitdiff
path: root/doc/langref/integer_literals.zig
blob: 96626857557fdd49708663d1f4bed534587d90f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
const decimal_int = 98222;
const hex_int = 0xff;
const another_hex_int = 0xFF;
const octal_int = 0o755;
const binary_int = 0b11110000;

// underscores may be placed between two digits as a visual separator
const one_billion = 1_000_000_000;
const binary_mask = 0b1_1111_1111;
const permissions = 0o7_5_5;
const big_address = 0xFF80_0000_0000_0000;

// syntax