aboutsummaryrefslogtreecommitdiff
path: root/exercises/069_comptime4.zig
diff options
context:
space:
mode:
authorDave Gauer <dave@ratfactor.com>2021-11-07 20:52:39 -0500
committerDave Gauer <dave@ratfactor.com>2021-11-07 20:52:39 -0500
commitd1e684126176214b65399034c96b6f52189b2b72 (patch)
tree5866b7f3a15945a73b946443fbd490fc8f4cc2d8 /exercises/069_comptime4.zig
parent266449b1dd8e5e89887aa84c2d10270cdd6c7936 (diff)
parentdedd787f2dd0badc03caa1299adaf57eaeaae156 (diff)
downloadziglings-d1e684126176214b65399034c96b6f52189b2b72.tar.gz
ziglings-d1e684126176214b65399034c96b6f52189b2b72.tar.bz2
ziglings-d1e684126176214b65399034c96b6f52189b2b72.tar.xz
ziglings-d1e684126176214b65399034c96b6f52189b2b72.zip
Merge branch 'main' of github.com:ratfactor/ziglings into main
Diffstat (limited to 'exercises/069_comptime4.zig')
-rw-r--r--exercises/069_comptime4.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/exercises/069_comptime4.zig b/exercises/069_comptime4.zig
index c1efa46..ecec2ee 100644
--- a/exercises/069_comptime4.zig
+++ b/exercises/069_comptime4.zig
@@ -13,14 +13,14 @@
//
const print = @import("std").debug.print;
-pub fn main() void {
+pub fn main() void {
// Here we declare arrays of three different types and sizes
// at compile time from a function call. Neat!
const s1 = makeSequence(u8, 3); // creates a [3]u8
const s2 = makeSequence(u32, 5); // creates a [5]u32
const s3 = makeSequence(i64, 7); // creates a [7]i64
- print("s1={any}, s2={any}, s3={any}\n", .{s1, s2, s3});
+ print("s1={any}, s2={any}, s3={any}\n", .{ s1, s2, s3 });
}
// This function is pretty wild because it executes at runtime
@@ -49,6 +49,6 @@ fn makeSequence(comptime T: type, ??? size: usize) [???]T {
while (i < size) : (i += 1) {
sequence[i] = @intCast(T, i) + 1;
}
-
+
return sequence;
}