aboutsummaryrefslogtreecommitdiff
path: root/exercises/064_builtins.zig
diff options
context:
space:
mode:
authorDave Gauer <ratfactor@gmail.com>2021-11-07 19:38:47 -0500
committerGitHub <noreply@github.com>2021-11-07 19:38:47 -0500
commitdedd787f2dd0badc03caa1299adaf57eaeaae156 (patch)
treeb89a125af4973d0a7b40121298c8f4fd8e8c9988 /exercises/064_builtins.zig
parent4147a9a39b362468cc6f16c8ce751ee3481321f4 (diff)
parentf6de68a1f23722457a0432ce520da668a50b2132 (diff)
downloadziglings-dedd787f2dd0badc03caa1299adaf57eaeaae156.tar.gz
ziglings-dedd787f2dd0badc03caa1299adaf57eaeaae156.tar.bz2
ziglings-dedd787f2dd0badc03caa1299adaf57eaeaae156.tar.xz
ziglings-dedd787f2dd0badc03caa1299adaf57eaeaae156.zip
Merge pull request #77 from jhalmen/fmt
whitespaces and zig fmt
Diffstat (limited to 'exercises/064_builtins.zig')
-rw-r--r--exercises/064_builtins.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/exercises/064_builtins.zig b/exercises/064_builtins.zig
index 735ff9d..e1af861 100644
--- a/exercises/064_builtins.zig
+++ b/exercises/064_builtins.zig
@@ -1,7 +1,7 @@
//
// The Zig compiler provides "builtin" functions. You've already
// gotten used to seeing an @import() at the top of every
-// Ziglings exercise.
+// Ziglings exercise.
//
// We've also seen @intCast() in "016_for2.zig", "058_quiz7.zig";
// and @enumToInt() in "036_enums2.zig".
@@ -51,10 +51,10 @@ pub fn main() void {
// 1111 + 1 = 0000 Yes! (Real answer is 10000)
// 0000 + 1 = 0001 Yes!
// 0001 + 1 = 0010 Yes!
- //
+ //
// Also, check out our fancy formatting! b:0>4 means, "print
// as a binary number, zero-pad right-aligned four digits."
- print("{b:0>4} + {b:0>4} = {b:0>4} ({})", .{a, b, my_result, overflowed});
+ print("{b:0>4} + {b:0>4} = {b:0>4} ({})", .{ a, b, my_result, overflowed });
print(". Furthermore, ", .{});
@@ -70,5 +70,5 @@ pub fn main() void {
// this builtin to reverse the bits of a u8 integer.
const input: u8 = 0b11110000;
const tupni: u8 = @bitReverse(input);
- print("{b:0>8} backwards is {b:0>8}.\n", .{input, tupni});
+ print("{b:0>8} backwards is {b:0>8}.\n", .{ input, tupni });
}