I must say though that I dislike your for loop condition. i < 10 always, for maximum readability. Writing it the other way around has always been a ridiculous idea. If you can remember to force yourself to reverse the condition, reducing readability, then you can instead remember to force yourself to use == instead of =. In this case though, it doesn't even apply. Also, compilers detect that sort of mistake for you, so there's really no excuse for it.
@iMalc: Thanks for your response! Yes, you are right; the reason I write it like that is, that I'll get a parser error if i accidentally type =, rather than == or !=, as i always leave a const expression on the left-hand side. I've been practicing this because I can be sure that the condition doesn't assign while sacrificing little or no readability.
It's nice to get some good input on the reverse thing, though, you're seeing exactly why I'm doing it, and you're right as far as the "if I can remember to reverse the condition, I can remember == also". I will take that into consideration when i write my next for-loop. ;)
One might of course argue that we empathize that the loop should take place 10 times, and therefore it's actually preferable to have it earlier on the line, even for readability.
Also I think you should meet a condition with a clearly defined == or !=, as you'll be able to determine exactly where the for-variable should stop unless you use floats. If one cannot do that, and tends to use > or < when counting integers, I think one should reconsider the for-loop entirely.
However it's great to get some proper input on the semantics, it seems being taught by old-school developers have both advantages and disadvantages. :-)
It's good to know that the issues with the early declarations have been dealt with, and my lessons as well as passing on of the late initialization -practice have been correct. Thanks Rip-off and Hodgman for supplying details.
http://www.parashift...nsic-types.html
@Hodgman: I read that. Makes good sense, as always!
(I've ordered that book from the parashift.com -site. I always think his writing style in there is great, and hope to find it in the book, too!)