Timeline for Why do most of us use 'i' as a loop counter variable?
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 28, 2013 at 14:07 | history | made wiki | Post Made Community Wiki by user95187 | ||
| Apr 10, 2013 at 8:07 | comment | added | totymedli | In your train of thought i could mean iterator as well. | |
| Jul 22, 2011 at 12:01 | comment | added | user8709 | Maybe worth adding that it's often literally an index (subscript) into an array that's accessed in the loop. Not always, but whether you view it as an index into the interations or not, it's still convenient to generalize from a common class of loop to a wider class of loop. BTW - personal freakiness - to me "index" tends to imply something like "database index", including key-to-subscript dictionaries/inverted tables in memory, so I prefer "subscript" rather than "index" to avoid the ambiguity. But I still use i for loops. | |
| Jun 26, 2011 at 0:01 | comment | added | Captain Sensible | You can cite me as a reference if you want. | |
| Jun 25, 2011 at 22:40 | comment | added | Louis Rhys | that i is used as the shorthand for "index" | |
| Jun 25, 2011 at 21:06 | comment | added | oh whatever | @Louis - reference for what? There's no rule, it's a common convention, but don't have to always use i as index... | |
| Jun 25, 2011 at 9:46 | comment | added | Louis Rhys | can you cite a reference? | |
| Jun 24, 2011 at 23:59 | comment | added | Mahmoud Hossam | ijk = "I'm just kidding". :-) | |
| Jun 24, 2011 at 23:43 | history | answered | oh whatever | CC BY-SA 3.0 |