mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 22:04:21 +00:00
9 lines
319 B
Zig
9 lines
319 B
Zig
const std = @import("std");
|
|
|
|
pub fn main() !void {
|
|
// If this program is run without stdout attached, exit with an error.
|
|
var stdout_file = try std.io.getStdOut();
|
|
// If this program encounters pipe failure when printing to stdout, exit
|
|
// with an error.
|
|
try stdout_file.write("Hello, world!\n");
|
|
}
|