Wouldn't the compiler be smart with this shadowing variable?
matheus at gmail.com
Fri Dec 10 13:35:37 UTC 2021
Wouldn't the compiler be smart with this shadowing variable,
onlineapp.d(3): Error: variable `j` is shadowing variable
So in the "for loop" shouldn't "i" be declared and "j" just be
assigned to 0?
I mean this is a bit weird, imagine I have different "for loops"
and in this situation I'll need to do this:
This works, but now "i" variable will be out of the "for loop"
More information about the Digitalmars-d-learn