From 4251076b50082023f609e2823b143993f7749b57 Mon Sep 17 00:00:00 2001 From: Dave Gauer Date: Sat, 10 Apr 2021 14:45:25 -0400 Subject: mention builtin ex coming up --- exercises/016_for2.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'exercises/016_for2.zig') diff --git a/exercises/016_for2.zig b/exercises/016_for2.zig index 0a62a1a..1d4496a 100644 --- a/exercises/016_for2.zig +++ b/exercises/016_for2.zig @@ -25,6 +25,9 @@ pub fn main() void { // // See if you can figure out the missing piece: for (bits) |bit, ???| { + // Note that we convert the usize i to a u32 with + // @intCast(), a builtin function just like @import(). + // We'll learn about these properly in a later exercise. var place_value = std.math.pow(u32, 2, @intCast(u32, i)); value += place_value * bit; } -- cgit v1.2.3-ZIG