mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 22:04:21 +00:00
21 lines
347 B
Zig
21 lines
347 B
Zig
const std = @import("std");
|
|
const print = std.debug.print;
|
|
|
|
pub fn main() void {
|
|
print("\n", .{});
|
|
|
|
defer {
|
|
print("1 ", .{});
|
|
}
|
|
defer {
|
|
print("2 ", .{});
|
|
}
|
|
if (false) {
|
|
// defers are not run if they are never executed.
|
|
defer {
|
|
print("3 ", .{});
|
|
}
|
|
}
|
|
}
|
|
|
|
// exe=succeed
|