41 ms·
Umm, I find the opposite to be true. By always declaring variables where I use them (notably in for loops), I avoid accidentally reusing a variable I used else
by colanderman 15y ago
Umm, I find the opposite to be true. By always declaring variables where I use them (notably in for loops), I avoid accidentally reusing a variable I used elsewhere.
- gujk 15y agoThat is a special case. Loop headers should be considered the top of scope blocks in C. I don't know why the language designers didn't do that.
- JoshTriplett 15y agoThey did, in C99.