mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-09 00:09:59 +00:00
dev.1711 - switched to multi-object-for-loops
This commit is contained in:
@@ -44,7 +44,7 @@ pub fn main() void {
|
||||
// it do and why?
|
||||
|
||||
// Printing all RPG characters in a loop:
|
||||
for (chars) |c, num| {
|
||||
for (chars, 0..) |c, num| {
|
||||
std.debug.print("Character {} - G:{} H:{} XP:{}\n", .{
|
||||
num + 1, c.gold, c.health, c.experience,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user