2017-10-31 01:47:55 -07:00
|
|
|
const std = @import("std");
|
2015-11-24 01:43:45 -08:00
|
|
|
|
2018-01-25 01:10:11 -08:00
|
|
|
pub fn main() %void {
|
2017-10-31 01:47:55 -07:00
|
|
|
// If this program is run without stdout attached, exit with an error.
|
2018-01-07 13:51:46 -08:00
|
|
|
var stdout_file = try std.io.getStdOut();
|
2017-10-31 01:47:55 -07:00
|
|
|
// If this program encounters pipe failure when printing to stdout, exit
|
|
|
|
// with an error.
|
2018-01-07 13:51:46 -08:00
|
|
|
try stdout_file.write("Hello, world!\n");
|
2015-08-05 15:46:40 -07:00
|
|
|
}
|