summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2023-01-27 00:13:50 +0100
committerGitHub <noreply@github.com>2023-01-27 00:13:50 +0100
commitc2cd1472a437178dcb7548f2177fb275c84fb5f3 (patch)
treeaa388e401a9b0835e39f370c5527f435cf34da5c
parent37326e3da229f1aa755143310aa2c921b985e870 (diff)
parentbe1f9cd9b261164718089b5c166177729c5f4afb (diff)
Merge pull request #170 from ratfactor/comment
comment corrected
-rw-r--r--exercises/064_builtins.zig9
1 files changed, 3 insertions, 6 deletions
diff --git a/exercises/064_builtins.zig b/exercises/064_builtins.zig
index 85d1aa7..8df11f7 100644
--- a/exercises/064_builtins.zig
+++ b/exercises/064_builtins.zig
@@ -26,14 +26,11 @@
const print = @import("std").debug.print;
pub fn main() void {
- // The first builtin, alphabetically, is:
- //
- // @addWithOverflow(comptime T: type, a: T, b: T, result: *T) bool
+ // The second builtin, alphabetically, is:
+ // @addWithOverflow(a: anytype, b: anytype) struct { @TypeOf(a, b), u1 }
// * 'T' will be the type of the other parameters.
// * 'a' and 'b' are numbers of the type T.
- // * 'result' is a pointer to space you're providing of type T.
- // * The return value is true if the addition resulted in a
- // value over or under the capacity of type T.
+ // * The return value is a tuple with the result and a possible overflow bit.
//
// Let's try it with a tiny 4-bit integer size to make it clear:
const a: u4 = 0b1101;