mirror of
https://github.com/ziglang/zig.git
synced 2024-12-01 01:22:50 +00:00
50339f595a
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
23 lines
323 B
Zig
23 lines
323 B
Zig
extern "c" fn write(c_int, usize, usize) usize;
|
|
|
|
pub fn main() void {
|
|
print();
|
|
print();
|
|
print();
|
|
print();
|
|
}
|
|
|
|
fn print() void {
|
|
const msg = @intFromPtr("Hello, World!\n");
|
|
const len = 14;
|
|
_ = write(1, msg, len);
|
|
}
|
|
|
|
// run
|
|
//
|
|
// Hello, World!
|
|
// Hello, World!
|
|
// Hello, World!
|
|
// Hello, World!
|
|
//
|