summaryrefslogtreecommitdiff
path: root/exercises
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2025-06-17 14:10:16 +0200
committerChris Boesch <chrboesch@noreply.codeberg.org>2025-06-17 14:10:16 +0200
commitbc96d06da4d3400f40babd1de0eb0e100d734273 (patch)
treed93343ffda857f50e8acf2ad875552a2bb1e8292 /exercises
parent451e1a373969f81fb63223e10b1d69ba7dac3523 (diff)
parentafaab2efca069cb4144d8bcb3a82ee042315ea6b (diff)
Merge branch 'main' into i278
Diffstat (limited to 'exercises')
-rw-r--r--exercises/050_no_value.zig2
-rw-r--r--exercises/080_anonymous_structs.zig8
-rw-r--r--exercises/099_formatting.zig2
-rw-r--r--exercises/108_labeled_switch.zig4
4 files changed, 8 insertions, 8 deletions
diff --git a/exercises/050_no_value.zig b/exercises/050_no_value.zig
index 8c73ed3..f5365cf 100644
--- a/exercises/050_no_value.zig
+++ b/exercises/050_no_value.zig
@@ -43,7 +43,7 @@
//
// "void" is a _type_, not a value. It is the most popular of the
// Zero Bit Types (those types which take up absolutely no space
-// and have only a semantic value. When compiled to executable
+// and have only a semantic value). When compiled to executable
// code, zero bit types generate no code at all. The above example
// shows a variable foo of type void which is assigned the value
// of an empty expression. It's much more common to see void as
diff --git a/exercises/080_anonymous_structs.zig b/exercises/080_anonymous_structs.zig
index 55dedd4..4e3ce84 100644
--- a/exercises/080_anonymous_structs.zig
+++ b/exercises/080_anonymous_structs.zig
@@ -19,12 +19,12 @@
// const MyBar = Bar(); // store the struct type
// const bar = Bar() {}; // create instance of the struct
//
-// * The value of @typeName(Bar()) is "Bar()".
-// * The value of @typeName(MyBar) is "Bar()".
-// * The value of @typeName(@TypeOf(bar)) is "Bar()".
+// * The value of @typeName(Bar()) is "<filename>.Bar()".
+// * The value of @typeName(MyBar) is "<filename>.Bar()".
+// * The value of @typeName(@TypeOf(bar)) is "<filename>.Bar()".
//
// You can also have completely anonymous structs. The value
-// of @typeName(struct {}) is "struct:<position in source>".
+// of @typeName(struct {}) is "<filename>.<function>__struct_<nnn>".
//
const print = @import("std").debug.print;
diff --git a/exercises/099_formatting.zig b/exercises/099_formatting.zig
index 37fab45..ef6b84e 100644
--- a/exercises/099_formatting.zig
+++ b/exercises/099_formatting.zig
@@ -60,7 +60,7 @@
// variety of formatting instructions. It's basically a tiny
// language of its own. Here's a numeric example:
//
-// print("Catch-{x:0>4}.", .{twenty_two});
+// print("Catch-0x{x:0>4}.", .{twenty_two});
//
// This formatting instruction outputs a hexadecimal number with
// leading zeros:
diff --git a/exercises/108_labeled_switch.zig b/exercises/108_labeled_switch.zig
index 9262c6f..897fcf5 100644
--- a/exercises/108_labeled_switch.zig
+++ b/exercises/108_labeled_switch.zig
@@ -19,10 +19,10 @@
// }
// break;
// }
-// std.debug.print("This statement cannot be reached\n", .{});
+// std.debug.print("This statement cannot be reached\n", .{});
// }
//
-// By combining all we've learned so far, we can now proceed with a labeled switch
+// By combining all we've learned so far, we can now proceed with a labeled switch.
//
// A labeled switch is some extra syntactic sugar, which comes with all sorts of
// candy (performance benefits). Don't believe me? Directly to source https://github.com/ziglang/zig/pull/21367