6.8.5 Iteration statements

Previous Table of Contents

1752

iteration-statement:
                while ( expression ) statement
                do statement while ( expression ) ;
                for ( expressionopt ; expressionopt ; expressionopt ) statement
                for ( declaration expressionopt ; expressionopt ) statement

1753 The controlling expression of an iteration statement shall have scalar type.

1754 The declaration part of a for statement shall only declare identifiers for objects having storage class auto or register.

1755 An iteration statement causes a statement called the loop body to be executed repeatedly until the controlling expression compares equal to 0.

1756 An iteration statement is a block whose scope is a strict subset of the scope of its enclosing block.

1757 The loop body is also a block whose scope is a strict subset of the scope of the iteration statement.

Next

Created at: 2005-06-29 02:19:03 The text from WG14/N1124 is copyright © ISO