mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
fix hello world example
This commit is contained in:
parent
c6fff3b2c0
commit
5fd754c84a
@ -6,18 +6,7 @@ extern {
|
||||
fn exit(code: i32) -> unreachable;
|
||||
}
|
||||
|
||||
fn loop(a : i32) {
|
||||
if a == 0 {
|
||||
goto done;
|
||||
}
|
||||
puts("loop");
|
||||
loop(a - 1);
|
||||
|
||||
done:
|
||||
return;
|
||||
}
|
||||
|
||||
export fn _start() -> unreachable {
|
||||
loop(3);
|
||||
puts("Hello, world!");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user