master
1const print = @import("std").debug.print;
2pub fn main() void {
3 const byte: u8 = 255;
4
5 const ov = @addWithOverflow(byte, 10);
6 if (ov[1] != 0) {
7 print("overflowed result: {}\n", .{ov[0]});
8 } else {
9 print("result: {}\n", .{ov[0]});
10 }
11}
12
13// exe=succeed