mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-07-28 18:25:16 +00:00
created also new patch file
This commit is contained in:
@@ -32,8 +32,8 @@ pub fn main(init: std.process.Init) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now you must be thinking "Why would I need to do this instead of good
|
// Now you must be thinking "Why would I need to do this instead of good
|
||||||
// old `std.debug.print()`?", but here's what you need to understand:
|
// old 'std.debug.print()'?", but here's what you need to understand:
|
||||||
// `std.debug.print()` prints its output to stderr, while the stdout_writer
|
// 'std.debug.print()' prints its output to stderr, while the stdout_writer
|
||||||
// approach prints to stdout.
|
// approach prints to stdout.
|
||||||
// A common practice is to pipe output of a command to other commands,
|
// A common practice is to pipe output of a command to other commands,
|
||||||
// and in order for the piping to work, those commands expect thier input
|
// and in order for the piping to work, those commands expect thier input
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
--- exercises/026_hello2.zig 2026-01-09 22:51:45.803358789 +0100
|
--- exercises/026_hello2.zig 2026-07-01 16:27:18.674459266 +0200
|
||||||
+++ answers/026_hello2.zig 2026-01-09 22:50:46.016166527 +0100
|
+++ answers/026_hello2.zig 2026-07-01 16:27:08.579220702 +0200
|
||||||
@@ -28,5 +28,5 @@
|
@@ -28,7 +28,7 @@
|
||||||
// to be able to pass it up as a return value of main().
|
// to be able to pass it up as a return value of main().
|
||||||
//
|
//
|
||||||
// We just learned of a single statement which can accomplish this.
|
// We just learned of a single statement which can accomplish this.
|
||||||
- stdout.print("Hello world!\n", .{});
|
- stdout.print("Hello world!\n", .{});
|
||||||
+ try stdout.print("Hello world!\n", .{});
|
+ try stdout.print("Hello world!\n", .{});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Now you must be thinking "Why would I need to do this instead of good
|
||||||
|
|||||||
Reference in New Issue
Block a user