0
What is the practical value of initiating more than one variable inside the first statement of a for loop?
I believe it makes the loop difficult to comprehend later on.
3 ответов
0
use colon to initiate more then one value in single line in a loop e.g int a,b,c; then after the last variable or value end it with semicolon
0
true, most of the time multiple variable values
are set outside the for loop by omitting the first statement ,so it has less practical value
0
It is there for that special cases just like 'x = 3' rerurning 3 where it was called. It's part of the language and standard, and it don't hurt anybody just being here. Problem of comprehension is usually matters for junior programmers that don't have experience and haven't seen some clever or elegant ways to do stuff.