Hello world/Newline omission: Difference between revisions

Content deleted Content added
Depperm (talk | contribs)
No edit summary
Matu3ba (talk | contribs)
Keep it simple. Explanations should go into newbie example.
Line 1,277:
 
=={{header|Zig}}==
<lang Zig>const std = @import("std");
{{works with|Zig|0.7.0 and higher}}
<lang Zig>
const std = @import("std");
 
// return type is Error Union type.
// it will return an inferred error set or void data type:
pub fn main() !void {
const stdout =try std.io.getStdOut().writer().writeAll("Hello world!");
}</lang Zig>
try stdout.print("Goodbye, {s}", .{"World!"}); // anonymous struct literal used for string substitution
}
</lang>
 
=={{header|ZX Spectrum Basic}}==