mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
fix hello world example
This commit is contained in:
parent
c6fff3b2c0
commit
5fd754c84a
1 changed files with 1 additions and 12 deletions
|
|
@ -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…
Add table
Reference in a new issue