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");
pub fn main() !void {

const stdout_wr = std.io.getStdOut().writer();
pub fn main() void {
while (true)
while (true) try stdout_wr.writeAll("SPAM\n");
std.debug.print("SPAM\n", .{});
}
}
</lang>
</lang>