+ 7

Standard for loop

In the lesson is reported that standard for loop has three parameters. I think, that like in other languages, they are not mandatory, but the semicolons are mandatory, to understand which parameter is omitted. Is it right?

7th May 2017, 4:40 PM
Daniele Gaito
Daniele Gaito - avatar
1 Resposta
+ 7
I mean: for (expr1;expr2;) // missing increment parameter for (expr1;;expr2) // missing test parameter for (;expr1;expr2) // missing init parameter
7th May 2017, 4:42 PM
Daniele Gaito
Daniele Gaito - avatar