From da219d3c40dd2711cb1b144a8fd2f6ca4e86d159 Mon Sep 17 00:00:00 2001 From: Dave Gauer Date: Tue, 15 Jun 2021 10:12:57 -0400 Subject: added ub exploration to ex090 --- 091_async8.zig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 091_async8.zig (limited to '091_async8.zig') diff --git a/091_async8.zig b/091_async8.zig new file mode 100644 index 0000000..5f9e19b --- /dev/null +++ b/091_async8.zig @@ -0,0 +1,20 @@ +// +// Perhaps you have been wondering why we have always called 'suspend' +// with an expression in the form of an empty block: +// +// suspend {} +// +// well, +// +const print = @import("std").debug.print; + +pub fn main() void { + + var my_beef = getBeef(0); + + print("beef? {X}!\n", .{my_beef}); +} + +fn getBeef(input: u32) u32 { + suspend {} +} -- cgit v1.2.3-ZIG