Loops/Infinite: Difference between revisions
Content added Content deleted
No edit summary |
(debug.prints to stderr, but we want to follow other examples that print to stdout.) |
||
Line 2,260: | Line 2,260: | ||
<lang Zig> |
<lang Zig> |
||
const std = @import("std"); |
const std = @import("std"); |
||
⚫ | |||
const stdout_wr = std.io.getStdOut().writer(); |
|||
⚫ | |||
while (true) |
while (true) try stdout_wr.writeAll("SPAM\n"); |
||
std.debug.print("SPAM\n", .{}); |
|||
} |
} |
||
</lang> |
</lang> |