Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: some more refining

...

Declarations of loop indices should be included within a for statement even if that results in multiple variable declarations in that statementthat do not include a comment about the purpose of the variable:

Code Block
bgColor#ccccff
public class Example {
  void function() {
    int mx = 100; // some max value

    for (int i = 0; i < mx; ++i ) {
      /* ... */
    }

  }
}

...