#Question about max number size
1 messages · Page 1 of 1 (latest)
account for potential sign
1 messages · Page 1 of 1 (latest)
I tried to make a number that was a u65535 and it caused the following compiler error:
zig/lib/std/fmt.zig:1426:17: error: overflow of integer type 'u16' with value '65536'
var buf: [1 + math.max(value_info.bits, 1)]u8 = undefined;
My question is why is buf adding 1 to the bit size?
account for potential sign