Просмотр исходного кода

Merge pull request #168 from chrboesch/end

the_end function added
Chris Boesch 2 лет назад
Родитель
Сommit
37326e3da2
3 измененных файлов с 14 добавлено и 0 удалено
  1. 4 0
      build.zig
  2. 8 0
      exercises/999_the_end.zig
  3. 2 0
      patches/patches/999_the_end.patch

+ 4 - 0
build.zig

@@ -460,6 +460,10 @@ const exercises = [_]Exercise{
     //     .output = "ABCDEF",
     //     .output = "ABCDEF",
     //     .@"async" = true,
     //     .@"async" = true,
     // },
     // },
+    .{
+        .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.",
+    },
 };
 };
 
 
 /// Check the zig version to make sure it can compile the examples properly.
 /// Check the zig version to make sure it can compile the examples properly.

+ 8 - 0
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", .{});
+}

+ 2 - 0
patches/patches/999_the_end.patch

@@ -0,0 +1,2 @@
+8a9
+> // gollum's line ;-)