3 ms·
Could you be so kind as to point out where you found this example please? I could not find it in the documentation link in parent post.
by abhijat 7y ago
Could you be so kind as to point out where you found this example please? I could not find it in the documentation link in parent post.
- coldtea 7y agoI/O examples such as that already exist on the Zig webpage, e.g. here: https://ziglang.org/#A-fresh-take-on-error-handling https://ziglang.org/#A-fresh-take-on-error-handling But the one I posted is from GitHub, where it has e.g: https://github.com/ziglang/zig/blob/8139c5a516eaa217ed76acdf09496895451c5c5c/example/cat/main.zig https://github.com/ziglang/zig/blob/8139c5a516eaa217ed76acdf... also: https://github.com/ziglang/zig/blob/92d9cef07116da8639ac33b7fd83ba1b35f0750c/std/io/test.zig https://github.com/ziglang/zig/blob/92d9cef07116da8639ac33b7...
- new4thaccount 7y agoThanks! It would be good to get this as part of the official doc. I can follow along with almost any language if there is enough examples I can piece together. I didn't think about scrolling through a bunch of GitHub pages. It isn't as convenient, but probably a better example of how to put together a full program as well as style.
- coldtea 7y agoYeah, Zig needs a "Zig by example" (akin to the Go and Rust by example pages).