C/C++ Best Practices #1

#1 loops should have simple constructs with only one terminating condition

Why?  All loops should have simple constructs with only one terminating condition in order to avoid the ambiguity that can occur when using AND / OR constructs with multiple terminating conditions.

Example #1:   for(int maxStates = 0; maxStates < NUMBER_OF_STATES; maxStates++)

Example #2: do{  ....   }while(rc=0);

Example #3 if there are multiple ways to exit a loop, use continue rather than a flag

How many terminating conditions should be coded on looping constructs?

    How many terminating conditions should be coded for a loop construct?

    Which of these loop constructs follows Visa's C/C++ best practices guideline?