Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If a while or for statement uses a loop counter, and increments or decrements the counter by more than one, it must use an inequality operator (that is, <, <=, >, or >=) to terminate the loop. This prevents the loop from executing indefinitely or until the counter wraps around and reaches the final value. (See rule NUM16 NUM00-J. Detect or prevent integer overflow.)

Noncompliant Code Example

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e6c331d64ecd6c95-76c70311-4d0949cb-acbb8d00-fc31a4d465bcb2d749d501d3"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

15.20.1 Numerical Comparison Operators <, <=, >, and >=

]]></ac:plain-text-body></ac:structured-macro>

...