mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 08:02:32 +00:00
18 lines
269 B
Zig
18 lines
269 B
Zig
|
extern "c" fn write(usize, usize, usize) usize;
|
||
|
|
||
|
pub fn main() void {
|
||
|
comptime var len: u32 = 5;
|
||
|
print(len);
|
||
|
len += 9;
|
||
|
print(len);
|
||
|
}
|
||
|
|
||
|
fn print(len: usize) void {
|
||
|
_ = write(1, @ptrToInt("Hello, World!\n"), len);
|
||
|
}
|
||
|
|
||
|
// run
|
||
|
//
|
||
|
// HelloHello, World!
|
||
|
//
|