diff options
author | Dave Gauer <dave@ratfactor.com> | 2021-02-09 18:36:57 -0500 |
---|---|---|
committer | Dave Gauer <dave@ratfactor.com> | 2021-02-09 18:36:57 -0500 |
commit | 55ad7c32f2d534b1fbd438204d21738f958c51a5 (patch) | |
tree | 16be4b53193105a759b3eec25be5e664d41c428d /27_defer.zig | |
parent | cf0920de31e9b5f3c5ba6de19a1b4c8d0c58b907 (diff) | |
download | ziglings-55ad7c32f2d534b1fbd438204d21738f958c51a5.tar.gz ziglings-55ad7c32f2d534b1fbd438204d21738f958c51a5.tar.bz2 ziglings-55ad7c32f2d534b1fbd438204d21738f958c51a5.tar.xz ziglings-55ad7c32f2d534b1fbd438204d21738f958c51a5.zip |
Moved exercises to exercises because exercises
Diffstat (limited to '27_defer.zig')
-rw-r--r-- | 27_defer.zig | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/27_defer.zig b/27_defer.zig deleted file mode 100644 index b41e2af..0000000 --- a/27_defer.zig +++ /dev/null @@ -1,25 +0,0 @@ -// -// You can assign some code to run _after_ a block of code exits by -// deferring it with a "defer" statement: -// -// { -// defer runLater(); -// runNow(); -// } -// -// In the example above, runLater() will run when the block ({...}) -// is finished. So the code above will run in the following order: -// -// runNow(); -// runLater(); -// -// This feature seems strange at first, but we'll see how it could be -// useful in the next exercise. -const std = @import("std"); - -pub fn main() void { - // Without changing anything else, please add a 'defer' statement - // to this code so that our program prints "One Two\n": - std.debug.print("Two\n", .{}); - std.debug.print("One ", .{}); -} |