|
|
@ -4,7 +4,7 @@
|
|
|
|
// them to functions, etc.
|
|
|
|
// them to functions, etc.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// This exercise demonstrates how we can store structs in an array and
|
|
|
|
// This exercise demonstrates how we can store structs in an array and
|
|
|
|
// how doing so lets us print them all (both) using a loop.
|
|
|
|
// how doing so lets us print them using a loop.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
const std = @import("std");
|
|
|
|
const std = @import("std");
|
|
|
|
|
|
|
|
|
|
|
@ -50,3 +50,9 @@ pub fn main() void {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If you tried running the program without adding Zump as mentioned
|
|
|
|
|
|
|
|
// above, you get what appear to be "garbage" values. In debug mode
|
|
|
|
|
|
|
|
// (which is the default), Zig writes the repeating pattern "10101010"
|
|
|
|
|
|
|
|
// in binary (or 0xAA in hex) to all undefined locations to make them
|
|
|
|
|
|
|
|
// easier to spot when debugging.
|
|
|
|