1
0
Fork 0
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:
Roman Frołow 2023-09-29 22:34:35 +02:00
parent 7c50bd1e47
commit 67bb8d997e

View file

@ -2,8 +2,8 @@
// The Zig language is in rapid development and continuously // The Zig language is in rapid development and continuously
// improves the language constructs. Ziglings evolves with it. // improves the language constructs. Ziglings evolves with it.
// //
// Until version 0.11, Zig's 'for' loops did not directly // Until version 0.11, Zig's 'for' loops did not have
// replicate the functionality of the C-style: "for(a;b;c)" // similar functionality of the C-style: "for(a;b;c)"
// which are so well suited for iterating over a numeric // which are so well suited for iterating over a numeric
// sequence. // sequence.
// //
@ -30,6 +30,9 @@
// //
// At the moment, ranges are only supported in 'for' loops. // 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 // Perhaps you recall Exercise 13? We were printing a numeric
// sequence like so: // sequence like so:
// //