mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-11-08 11:20:46 -05:00
Merge pull request #20 from quexxon/exercise_12_fixes
Exercise 12 fixes
This commit is contained in:
commit
882a6b6198
1 changed files with 3 additions and 3 deletions
|
@ -1,17 +1,17 @@
|
|||
//
|
||||
// Zig 'while' statements can have an optional 'continue expression'
|
||||
// which runs every time the while loop continues (either at the
|
||||
// end of the loop or when an explicit 'continue' is invoked (we'll
|
||||
// end of the loop or when an explicit 'continue' is invoked - we'll
|
||||
// try those out next):
|
||||
//
|
||||
// while (condition) : (continue expression)
|
||||
// while (condition) : (continue expression) {
|
||||
// ...
|
||||
// }
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// var foo = 2;
|
||||
// while (foo<10) : (foo+=2)
|
||||
// while (foo<10) : (foo+=2) {
|
||||
// // Do something with even numbers less than 10...
|
||||
// }
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue