← All examples

Deci context

Deci beside other things: a group of bare numbers beside a deci takes its width; a bin's useful form is the shortest at its own width; a deci map key is its value, so 1.50 and…

deci_context.zg
# deci beside other things (compiler claude's findings, 2026-09-29): a group of bare numbers beside a deci
# takes its width; a bin's useful form is the shortest at its own width; a deci map key is its value,
# so 1.50 and 1.5 are one key (maps.md: plain values by value); map.set's key takes the key type.
MAIN {
    let 'a': deci64 = 1.00;
    std::print.stored['a' plus (1.5 times 2), " ", 'a' plus 1.5 times 2, newln];
    let 'f': bin32 = 0.1;
    std::print.stored[to.useful.deci64['f'], " ", to.stored.deci64['f'], newln];
    let mut 'm': map[deci64, int32] = map.empty;
    map.set[lend.mut 'm', key 1.50, value 7];
    std::print.stored[map.has[lend 'm', key 1.5], newln];
}
Output
4.00 4.00
0.1 0.1000000014901161
true