[scribus-dev] for i
ale.comp_06 at xox.ch
Wed Sep 21 15:54:45 UTC 2011
having been hacking a bit on scribus lately, i was wondering why each "for loop" has a different letter as the index.
personally, i've learned to always use i, j and k (in this order, avoiding nesting them if possible) for the "for" loops.
the big advantage is that each time you see an i, a j or a k you know it's a counter and just have to look at the definition of the loop to check what its value means and understand what it does.
currently, any single letter or combination of two letter is in use. that way you have to go up the code one line at a time and see where the "a" (or c, or p, or pa...) is defined... until you get to the loop definition.
or are scribus developers only using single letter variables for the loops?
does anybody agree on using "i" whenever it's possible?
More information about the scribus-dev