mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-06-08 10:07:01 +09:00
Similar to C-style for
This commit is contained in:
parent
7c50bd1e47
commit
67bb8d997e
1 changed files with 5 additions and 2 deletions
|
@ -2,8 +2,8 @@
|
|||
// The Zig language is in rapid development and continuously
|
||||
// improves the language constructs. Ziglings evolves with it.
|
||||
//
|
||||
// Until version 0.11, Zig's 'for' loops did not directly
|
||||
// replicate the functionality of the C-style: "for(a;b;c)"
|
||||
// Until version 0.11, Zig's 'for' loops did not have
|
||||
// similar functionality of the C-style: "for(a;b;c)"
|
||||
// which are so well suited for iterating over a numeric
|
||||
// sequence.
|
||||
//
|
||||
|
@ -30,6 +30,9 @@
|
|||
//
|
||||
// At the moment, ranges are only supported in 'for' loops.
|
||||
//
|
||||
// Still C-style: "for(a;b;c)" allows for more flexibility, like multiple
|
||||
// counters, different step amount, etc.
|
||||
//
|
||||
// Perhaps you recall Exercise 13? We were printing a numeric
|
||||
// sequence like so:
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue