From 8e30debc6aa05a9313a085ba52b38d5c7224a7ea Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sun, 28 Dec 2025 02:01:19 +0100 Subject: [PATCH] improved i/o explanation for exc. 26 --- exercises/026_hello2.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/exercises/026_hello2.zig b/exercises/026_hello2.zig index 081c2b3..7daa9e2 100644 --- a/exercises/026_hello2.zig +++ b/exercises/026_hello2.zig @@ -5,7 +5,7 @@ // const std = @import("std"); -// Instance for input/output, we'll learn how to create them later. +// Instance for input/output operations, we'll learn how to create them later. const io = std.Options.debug_io; // Take note that this main() definition now returns "!void" rather @@ -18,8 +18,9 @@ const io = std.Options.debug_io; // https://ziglang.org/documentation/master/#Inferred-Error-Sets // pub fn main() !void { - // We get a Writer interface for Standard Out so we can print() to it. + // We get a Writer for Standard Out... var stdout_writer = std.Io.File.stdout().writer(io, &.{}); + // ...and extract its interface so we can print() to it. const stdout = &stdout_writer.interface; // Unlike std.debug.print(), the Standard Out writer can fail