mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-08-02 22:55:37 +00:00
chore: Update documentation for the while
loop with continue
statement
This commit is contained in:
parent
e8f09190d6
commit
0f6e849660
|
@ -8,12 +8,16 @@
|
||||||
// while (condition) : (continue expression) {
|
// while (condition) : (continue expression) {
|
||||||
//
|
//
|
||||||
// if (other condition) continue;
|
// if (other condition) continue;
|
||||||
//
|
// more statements;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// The "continue expression" executes every time the loop restarts
|
// The continue statement causes the rest of the statements in the block {} to be skipped
|
||||||
// whether the "continue" statement happens or not.
|
// for this iteration of the loop.
|
||||||
//
|
//
|
||||||
|
// Then, the "continue expression" is executed and then
|
||||||
|
// the condition is checked again. If the condition is true, the block executes again.
|
||||||
|
//
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
|
|
||||||
pub fn main() void {
|
pub fn main() void {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user