mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 08:02:32 +00:00
50339f595a
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
21 lines
265 B
Zig
21 lines
265 B
Zig
const builtin = @import("builtin");
|
|
|
|
extern "c" fn write(c_int, usize, usize) usize;
|
|
|
|
pub fn main() void {
|
|
for ("hello") |_| print();
|
|
}
|
|
|
|
fn print() void {
|
|
_ = write(1, @intFromPtr("hello\n"), 6);
|
|
}
|
|
|
|
// run
|
|
//
|
|
// hello
|
|
// hello
|
|
// hello
|
|
// hello
|
|
// hello
|
|
//
|