NAME
        for - loop statement

SYNOPSYS
	for (<initialization>; <condition>; <update>) <code>;
	for (<initialization>; <condition>; <update>) { <code>; [<code>;] }

DESCRIPTION
        A for-loop will run as long as <condition> is true. When the for-loop
        is first started, the <initialization> code is executed once. This is
        normally used to initialize the loop variable. Then, if <condition>
        is true (that is, nonzero), it will go through the <code> and finally
        the <update> is executed once. The update normally used to update the
        loop variable. If <condition> is still true, it will execute the <code>
        again, etc.

        The standard loop control statements break and continue can be used.
        Loop statements may be nested.

ARGUMENTS
        <initialization> - zero or more comma-separated statements that are
                 run once at the start of the for-loop. Generally used to
                 initialize the loop variable.
        <condition> - the for-loop will run as long as the <condition> is
                 true. It will be tested before each round of the loop.
        <update> - zero or more comma-separated statements that are run at
                 the end of each round of the for-loop. Generally used to
                 update the loop variable.
        <code> - a line of code that is executed for each element. Note that
                 without the { } the <code> may only be a single statement.

EXAMPLES
        for (value = 0, sum = 0; value < 10; value += 2) { sum += value; }

        The next two statements are identical in their execution:

        for (index = 0; index < sizeof(names); index++) write(names[index]);
        foreach(string name: names) write(name);

SEE ALSO
        break, continue, foreach, while