authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-11-24 15:06:12-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-11-24 15:06:12-05:00
log741504862c7094dc91d3bf4c4da58e9236a7633a
treeb7b7c0d21e2fc96a3010641a28c7e7ab9b7006a1
parent5a25505668bac9aed0ad8f3b23fe81c6aff29b71

update homepage docs


1 files changed, 6 insertions(+), 2 deletions(-)

doc/home.html.in+6-2
......@@ -70,10 +70,14 @@
7070 <li><a href="#mersenne">Mersenne Twister Random Number Generator</a></li>
7171 </ul>
7272 <h3 id="hello">Hello World</h3>
73 <pre><code class="zig">const io = @import("std").io;
73 <pre><code class="zig">const std = @import("std");
7474
7575pub fn main() -&gt; %void {
76 %return io.stdout.printf("Hello, world!\n");
76 // If this program is run without stdout attached, exit with an error.
77 var stdout_file = %return std.io.getStdOut();
78 // If this program encounters pipe failure when printing to stdout, exit
79 // with an error.
80 %return stdout_file.write("Hello, world!\n");
7781}</code></pre>
7882 <p>Build this with:</p>
7983 <pre>zig build-exe hello.zig</pre>