← All examples

Any width

Integers of any width, marked as not standard: not_std.int24 / not_std.uint4.

any_width.zg
# Integers of any width, marked as not standard (owner, 2026-10-03): `not_std.int24` / `not_std.uint4`. Each holds exactly its width's range; `plus.wrap` wraps at it.
MAIN {
    let 'sample': not_std.int24 = -8_000_000;
    let 'flags': not_std.uint4 = 9;
    let 'big': not_std.int100 = 1_000_000_000_000_000_000;
    std::print.useful['sample', " ", 'flags', " ", 'big', " ", ('flags' plus.wrap 9), newln];
}
Output
-8000000 9 1000000000000000000 2