mirror of
https://github.com/ziglang/zig.git
synced 2025-12-08 07:13:08 +00:00
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
|
|
//
|