aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/exercises
diff options
context:
space:
mode:
authorDave Gauer <dave@ratfactor.com>2021-03-07 10:08:07 -0500
committerDave Gauer <dave@ratfactor.com>2021-03-07 10:08:07 -0500
commit784b66ffcf8b26ec0b9699ab06ee46c14cbf886e (patch)
tree18d6d4b501e70770f490fcd93a99bd63583b7f5b /exercises
parent4a421cca28b8bd831dae3d6a22644c4c6932138c (diff)
"Multi pointers" are now "many pointers"
TypeInfo.Pointer.Size says "many", so there we are!
Diffstat (limited to 'exercises')
-rw-r--r--exercises/54_manypointers.zig (renamed from exercises/54_multipointers.zig)10
1 files changed, 5 insertions, 5 deletions
diff --git a/exercises/54_multipointers.zig b/exercises/54_manypointers.zig
index b6fb1f7..05edd3b 100644
--- a/exercises/54_multipointers.zig
+++ b/exercises/54_manypointers.zig
@@ -18,19 +18,19 @@ pub fn main() void {
//
// const zen12: []const u8 = "...";
//
- // Now let's turn this into a "multi pointer":
- const zen_multiptr: [*]const u8 = zen12;
+ // Now let's turn this into a "many pointer":
+ const zen_manyptr: [*]const u8 = zen12;
- // It's okay to access zen_multiptr just like an array or slice as
+ // It's okay to access zen_manyptr just like an array or slice as
// long as you keep track of the length yourself!
//
// A "string" in Zig is a pointer to an array of const u8 values
// or a slice of const u8 values, into one, as we saw above). So,
- // we could treat a "multi pointer" of const u8 a string as long
+ // we could treat a "many pointer" of const u8 a string as long
// as we can CONVERT IT TO A SLICE. (Hint: we do know the length!)
//
// Please fix this line so the print below statement can print it:
- const zen12_string: []const u8 = zen_multiptr;
+ const zen12_string: []const u8 = zen_manyptr;
// Here's the moment of truth!
std.debug.print("{s}\n", .{zen12_string});