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/058_quiz7.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'exercises/058_quiz7.zig') diff --git a/exercises/058_quiz7.zig b/exercises/058_quiz7.zig index 46d68a8..59b48ba 100644 --- a/exercises/058_quiz7.zig +++ b/exercises/058_quiz7.zig @@ -419,7 +419,10 @@ pub fn main() void { // we need to loop through the items in reverse, skipping nulls, until // we reach the destination at the front of the array. fn printTrip(trip: []?TripItem) void { - var i: u8 = @intCast(u8, trip.len); // convert usize length + // We convert the usize length to a u8 with @intCast(), a + // builtin function just like @import(). We'll learn about + // these properly in a later exercise. + var i: u8 = @intCast(u8, trip.len); while (i > 0) { i -= 1; -- cgit v1.2.3-ZIG