aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Boesch <[email protected]>2023-08-27 18:57:50 +0200
committerGitHub <[email protected]>2023-08-27 18:57:50 +0200
commitacb0a9e0fee6508e9509f2a6e1a15aa5629edffb (patch)
tree3ef4c940fb0455d42971d91de9df9c7d1387252f
parent65a4c210174e3b59f216c9b3044ce8858c9cd178 (diff)
parent8c2202c73d1d92a6f32ff0f7ea9f58818fe53c75 (diff)
downloadziglings-acb0a9e0fee6508e9509f2a6e1a15aa5629edffb.tar.xz
ziglings-acb0a9e0fee6508e9509f2a6e1a15aa5629edffb.zip
Merge pull request #356 from juergenhoetzel/code-point-size
Add example for Unicode Code point literal > 255 Thanks! :smile:
-rw-r--r--exercises/059_integers.zig3
-rw-r--r--patches/patches/059_integers.patch2
2 files changed, 3 insertions, 2 deletions
diff --git a/exercises/059_integers.zig b/exercises/059_integers.zig
index 4410079..39e077c 100644
--- a/exercises/059_integers.zig
+++ b/exercises/059_integers.zig
@@ -6,7 +6,8 @@
// const a2: u8 = 0x41; // hexadecimal
// const a3: u8 = 0o101; // octal
// const a4: u8 = 0b1000001; // binary
-// const a5: u8 = 'A'; // UTF-8 code point literal
+// const a5: u8 = 'A'; // ASCII code point literal
+// const a6: u16 = 'Ȁ'; // Unicode code points can take up to 21 bits
//
// You can also place underscores in numbers to aid readability:
//
diff --git a/patches/patches/059_integers.patch b/patches/patches/059_integers.patch
index 7075ebe..c75cf8a 100644
--- a/patches/patches/059_integers.patch
+++ b/patches/patches/059_integers.patch
@@ -1,4 +1,4 @@
-22,24c22,24
+23,25c23,25
< 0o131, // octal
< 0b1101000, // binary
< 0x66, // hex