mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 09:02:32 +00:00
12 lines
256 B
Zig
12 lines
256 B
Zig
|
const parseU64 = @import("error_union_parsing_u64.zig").parseU64;
|
||
|
|
||
|
fn doAThing(str: []u8) void {
|
||
|
const number = parseU64(str, 10) catch blk: {
|
||
|
// do things
|
||
|
break :blk 13;
|
||
|
};
|
||
|
_ = number; // number is now initialized
|
||
|
}
|
||
|
|
||
|
// syntax
|