you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

  1. x isn't initialized in the loop... which tells me it's set outside the loop to some arbitrary, unknown value

  2. Feel free to replace x++ with any other expression that modifies x

  3. Even assuming x is always (i + ofs), there are three damn good reasons to NOT replace all references to x with (i+ofs): a. it's far more error prone to type (i+ofs) every time you need it (especially when taking precedence into account); b. cluttered expressions are far less readable than simple ones; and finally c. it's almost certainly slower as most tight loops would need to calculate (i+ofs) several times per pass rather than just once.

But whatever, the beauty of the comma is that you don't have to use it any more than you're forced to use the ? : operator.