If it is a simple loop, then I don't think that short names bother people. It's when loops get to be long and complicated.Quote:
Originally posted by sleeping
It is my opinion that (almost) everybody uses single-character identifiers for for-loops, and the widely spread identifiers i, j and k for loops shouldn't confuse anyone.
However, take a look at the following code from Numerical Recipes in C online PDFs:
amotsa() on page 11 of Chapter 10 Section 9
pages 9 and 10 of Chapter 9 Section 7
I have used seen rather complicated loops in code I have worked with -- on the orders of 500+ lines with 4 embedded loops. In here, clear variable names are critical to the understanding of the code.
- Kevin
