From e0519030550ef58a491fcc66e35c20b5646f12c9 Mon Sep 17 00:00:00 2001 From: Airbus5717 Date: Wed, 21 Jul 2021 13:04:52 +0300 Subject: added newline print to make output look nicer --- build.zig | 14 +++----------- exercises/052_slices.zig | 1 + 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/build.zig b/build.zig index 0f9adce..dd57606 100644 --- a/build.zig +++ b/build.zig @@ -280,7 +280,7 @@ const exercises = [_]Exercise{ }, .{ .main_file = "052_slices.zig", - .output = "Hand1: A 4 K 8 Hand2: 5 2 Q J", + .output = "Hand1: A 4 K 8 \nHand2: 5 2 Q J", }, .{ .main_file = "053_slices2.zig", @@ -302,11 +302,7 @@ const exercises = [_]Exercise{ .main_file = "057_unions3.zig", .output = "Insect report! Ant alive is: true. Bee visited 17 flowers.", }, - .{ - .main_file = "058_quiz7.zig", - .output = "Archer's Point--2->Bridge--1->Dogwood Grove--3->Cottage--2->East Pond--1->Fox Pond", - .hint = "This is the biggest program we've seen yet. But you can do it!" - }, + .{ .main_file = "058_quiz7.zig", .output = "Archer's Point--2->Bridge--1->Dogwood Grove--3->Cottage--2->East Pond--1->Fox Pond", .hint = "This is the biggest program we've seen yet. But you can do it!" }, .{ .main_file = "059_integers.zig", .output = "Zig is cool.", @@ -336,11 +332,7 @@ const exercises = [_]Exercise{ .main_file = "065_builtins2.zig", .output = "A Narcissus loves all Narcissuses. He has room in his heart for: me myself.", }, - .{ - .main_file = "066_comptime.zig", - .output = "Immutable: 12345, 987.654; Mutable: 54321, 456.789; Types: comptime_int, comptime_float, u32, f32", - .hint = "It may help to read this one out loud to your favorite stuffed animal until it sinks in completely." - }, + .{ .main_file = "066_comptime.zig", .output = "Immutable: 12345, 987.654; Mutable: 54321, 456.789; Types: comptime_int, comptime_float, u32, f32", .hint = "It may help to read this one out loud to your favorite stuffed animal until it sinks in completely." }, .{ .main_file = "067_comptime2.zig", .output = "A BB CCC DDDD", diff --git a/exercises/052_slices.zig b/exercises/052_slices.zig index 1810d6b..3ee5383 100644 --- a/exercises/052_slices.zig +++ b/exercises/052_slices.zig @@ -47,6 +47,7 @@ fn printHand(hand: ???) void { for (hand) |h| { std.debug.print("{u} ", .{h}); } + std.debug.print("\n", .{}); } // // Fun fact: Under the hood, slices are stored as a pointer to -- cgit v1.2.3-70-g09d2 From d6051b8b72afc70906ba28aa9a103f3c50562862 Mon Sep 17 00:00:00 2001 From: Airbus5717 Date: Wed, 21 Jul 2021 17:02:13 +0300 Subject: fix fmt --- build.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index dd57606..645419c 100644 --- a/build.zig +++ b/build.zig @@ -302,7 +302,11 @@ const exercises = [_]Exercise{ .main_file = "057_unions3.zig", .output = "Insect report! Ant alive is: true. Bee visited 17 flowers.", }, - .{ .main_file = "058_quiz7.zig", .output = "Archer's Point--2->Bridge--1->Dogwood Grove--3->Cottage--2->East Pond--1->Fox Pond", .hint = "This is the biggest program we've seen yet. But you can do it!" }, + .{ + .main_file = "058_quiz7.zig", + .output = "Archer's Point--2->Bridge--1->Dogwood Grove--3->Cottage--2->East Pond--1->Fox Pond", + .hint = "This is the biggest program we've seen yet. But you can do it!" + }, .{ .main_file = "059_integers.zig", .output = "Zig is cool.", -- cgit v1.2.3-70-g09d2 From fca600290cd6e74e3f324150abca02044613a46e Mon Sep 17 00:00:00 2001 From: Airbus5717 Date: Wed, 21 Jul 2021 17:03:44 +0300 Subject: another fix --- build.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 645419c..70127ad 100644 --- a/build.zig +++ b/build.zig @@ -336,7 +336,11 @@ const exercises = [_]Exercise{ .main_file = "065_builtins2.zig", .output = "A Narcissus loves all Narcissuses. He has room in his heart for: me myself.", }, - .{ .main_file = "066_comptime.zig", .output = "Immutable: 12345, 987.654; Mutable: 54321, 456.789; Types: comptime_int, comptime_float, u32, f32", .hint = "It may help to read this one out loud to your favorite stuffed animal until it sinks in completely." }, + .{ + .main_file = "066_comptime.zig", + .output = "Immutable: 12345, 987.654; Mutable: 54321, 456.789; Types: comptime_int, comptime_float, u32, f32", + .hint = "It may help to read this one out loud to your favorite stuffed animal until it sinks in completely." + }, .{ .main_file = "067_comptime2.zig", .output = "A BB CCC DDDD", -- cgit v1.2.3-70-g09d2