previous | index | next

The for Statement

A variable such as n in the factorial function is called a loop control variable (LCV).

Iterations that proceed by successively incrementing or decrementing LCVs can be accomplished using a for statement.

The for statement has the form:

      for (init; test; step) statement;
where: statement can be compound, but it doesn't have to be.

previous | index | next