aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorInKryption <59504965+InKryption@users.noreply.github.com>2022-02-22 02:21:22 +0100
committerGitHub <noreply@github.com>2022-02-22 02:21:22 +0100
commit66a1f7bb61b8998903c4495507453cac4a4449da (patch)
tree2fd1767d721a1c462d53829e8b8bb26e4ad61f90
parentb61186d6a5b5bd4e9179a10ed463136e960da5db (diff)
Revert syntax demo, add note
So as to not overwhelm the reader with syntax that is unseen up to this point, use the original demonstration, but add an explanatory note hinting that there is more to the semantics of string literals than shown.
-rw-r--r--exercises/006_strings.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/exercises/006_strings.zig b/exercises/006_strings.zig
index 5c4d951..5a7172c 100644
--- a/exercises/006_strings.zig
+++ b/exercises/006_strings.zig
@@ -7,9 +7,11 @@
//
// const foo = "Hello";
//
-// Is the same as:
+// Is almost* the same as:
//
-// const foo = &[_:0]u8{ 'H', 'e', 'l', 'l', 'o' };
+// const foo = [_]u8{ 'H', 'e', 'l', 'l', 'o' };
+//
+// (* We'll see what Zig strings REALLY are in Exercise 77.)
//
// Notice how individual characters use single quotes ('H') and
// strings use double quotes ("H"). These are not interchangeable!