01-05-2013, 02:23 PM
Section 8.14 defines a loop counter as "an object, array element or member of a structure or union which"Is 'x' "involved in a decision to exit the loop"?
What ofwhere 'h()' returns a value based on, say, a static variable, 'q'; is 'q' "involved in a decision to exit the loop"?
- 1. has scalar type,
2. varies monotonically on each iteration of a given instance of a loop, and
3. is involved in a decision to exit the loop.
Code:
...
if( g(x) )
break;
...
What of
Code:
...
if( h() )
break;
...