mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 23:22:44 +00:00
13 lines
258 B
Zig
13 lines
258 B
Zig
const print = @import("std").debug.print;
|
|
pub fn main() void {
|
|
const optional_number: ?i32 = null;
|
|
|
|
if (optional_number) |number| {
|
|
print("got number: {}\n", .{number});
|
|
} else {
|
|
print("it's null\n", .{});
|
|
}
|
|
}
|
|
|
|
// exe=succeed
|