mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
20 lines
265 B
Zig
20 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
|
|
//
|