mirror of
https://github.com/ziglang/zig.git
synced 2024-12-17 08:40:19 +00:00
13 lines
238 B
Zig
13 lines
238 B
Zig
const std = @import("std");
|
|
|
|
pub fn main() void {
|
|
const number = getNumberOrFail() catch unreachable;
|
|
std.debug.print("value: {}\n", .{number});
|
|
}
|
|
|
|
fn getNumberOrFail() !i32 {
|
|
return error.UnableToReturnNumber;
|
|
}
|
|
|
|
// exe=fail
|