mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-11-09 19:40:48 -05:00
Merge pull request #188 from chrboesch/issue_185
issue 185, description improved
This commit is contained in:
commit
b2de68869e
1 changed files with 7 additions and 2 deletions
|
@ -7,8 +7,13 @@ const std = @import("std");
|
||||||
|
|
||||||
// Take note that this main() definition now returns "!void" rather
|
// Take note that this main() definition now returns "!void" rather
|
||||||
// than just "void". Since there's no specific error type, this means
|
// than just "void". Since there's no specific error type, this means
|
||||||
// that Zig will infer the error type. This is appropriate in the case
|
// that Zig will infer the error type. This is appropriate in the
|
||||||
// of main(), but can have consequences elsewhere.
|
// case of main(), but can make a function harder (function pointers)
|
||||||
|
// or even impossible to work with (recursion) in some situations.
|
||||||
|
//
|
||||||
|
// You can find more information at:
|
||||||
|
// https://ziglang.org/documentation/master/#Inferred-Error-Sets
|
||||||
|
//
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
// We get a Writer for Standard Out so we can print() to it.
|
// We get a Writer for Standard Out so we can print() to it.
|
||||||
const stdout = std.io.getStdOut().writer();
|
const stdout = std.io.getStdOut().writer();
|
||||||
|
|
Loading…
Reference in a new issue