From 007f4d655b54f164bbe64c67f0cdd5971f578925 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sat, 21 Jan 2023 23:26:53 +0100 Subject: the_end function added --- build.zig | 4 ++++ exercises/the_end.zig | 6 ++++++ patches/patches/the_end.patch | 0 3 files changed, 10 insertions(+) create mode 100644 exercises/the_end.zig create mode 100644 patches/patches/the_end.patch diff --git a/build.zig b/build.zig index 2f84fbb..b3f254a 100644 --- a/build.zig +++ b/build.zig @@ -460,6 +460,10 @@ const exercises = [_]Exercise{ // .output = "ABCDEF", // .@"async" = true, // }, + .{ + .main_file = "the_end.zig", + .output = "This is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.", + }, }; /// Check the zig version to make sure it can compile the examples properly. diff --git a/exercises/the_end.zig b/exercises/the_end.zig new file mode 100644 index 0000000..d6b29e0 --- /dev/null +++ b/exercises/the_end.zig @@ -0,0 +1,6 @@ +// This is the end for now! +// More exercises will follow... + +pub fn main() void { + @import("std").debug.print("This is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.", .{}); +} diff --git a/patches/patches/the_end.patch b/patches/patches/the_end.patch new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3 From 419b388f8dbd50876fd07ecc003b3fb790a4e028 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sat, 21 Jan 2023 23:54:11 +0100 Subject: fix mac error --- exercises/the_end.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exercises/the_end.zig b/exercises/the_end.zig index d6b29e0..4ff2449 100644 --- a/exercises/the_end.zig +++ b/exercises/the_end.zig @@ -1,6 +1,8 @@ // This is the end for now! // More exercises will follow... +const print = @import("std").debug.print; + pub fn main() void { - @import("std").debug.print("This is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.", .{}); + print("\nThis is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.\n", .{}); } -- cgit v1.2.3 From 9d9dc1dacfa43c8c029a1829ee14e34c70ca6d12 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sun, 22 Jan 2023 13:12:53 +0100 Subject: changed 'the_end' to '999_the_end' --- build.zig | 2 +- exercises/999_the_end.zig | 8 ++++++++ exercises/the_end.zig | 8 -------- patches/patches/999_the_end.patch | 0 patches/patches/the_end.patch | 0 5 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 exercises/999_the_end.zig delete mode 100644 exercises/the_end.zig create mode 100644 patches/patches/999_the_end.patch delete mode 100644 patches/patches/the_end.patch diff --git a/build.zig b/build.zig index b3f254a..3943d01 100644 --- a/build.zig +++ b/build.zig @@ -461,7 +461,7 @@ const exercises = [_]Exercise{ // .@"async" = true, // }, .{ - .main_file = "the_end.zig", + .main_file = "999_the_end.zig", .output = "This is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.", }, }; diff --git a/exercises/999_the_end.zig b/exercises/999_the_end.zig new file mode 100644 index 0000000..4ff2449 --- /dev/null +++ b/exercises/999_the_end.zig @@ -0,0 +1,8 @@ +// This is the end for now! +// More exercises will follow... + +const print = @import("std").debug.print; + +pub fn main() void { + print("\nThis is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.\n", .{}); +} diff --git a/exercises/the_end.zig b/exercises/the_end.zig deleted file mode 100644 index 4ff2449..0000000 --- a/exercises/the_end.zig +++ /dev/null @@ -1,8 +0,0 @@ -// This is the end for now! -// More exercises will follow... - -const print = @import("std").debug.print; - -pub fn main() void { - print("\nThis is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.\n", .{}); -} diff --git a/patches/patches/999_the_end.patch b/patches/patches/999_the_end.patch new file mode 100644 index 0000000..e69de29 diff --git a/patches/patches/the_end.patch b/patches/patches/the_end.patch deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3 From 0616cc43035d96b05f545edbd01a1147c0f3ff6d Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sun, 22 Jan 2023 13:34:46 +0100 Subject: try to fix mac error --- patches/patches/999_the_end.patch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/patches/patches/999_the_end.patch b/patches/patches/999_the_end.patch index e69de29..ae674da 100644 --- a/patches/patches/999_the_end.patch +++ b/patches/patches/999_the_end.patch @@ -0,0 +1,2 @@ +8a9 +> // gollum's line ;-) -- cgit v1.2.3