basic/process_control/loop #127
Replies: 1 comment
-
var i: usize = 0;
while (i < 10) {
if (i == 5) {
continue;
}
std.debug.print("i is {}\n", .{i});
i += 1;
} continue 之前加一个 i+=1, 不然 i一直等于5,导致死循环; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
basic/process_control/loop
简单、快速地学习 Zig,ziglang中文教程,zig中文教程
https://course.ziglang.cc/basic/process_control/loop
Beta Was this translation helpful? Give feedback.
All reactions