[Main]
Keywords=for

[Description]
For loop.

[Explanation]
For-loop is yet another kind of loop. It uses <CODE>for</CODE> keyword, with the following
syntax:
<PRE>for ([<I>expr1</I>]; [<I>expr2</I>]; [<I>expr3</I>]) <I>statement</I>
</PRE>
<I>statement</I> is executed repeatedly until the value of <I>expr2</I> is 0.
Before the first iteration, <I>expr1</I> is evaluated. This is usually used to
initialize variables for the loop.
After each iteration of the loop, <I>expr3</I> is evaluated. This is usually used
to increment a loop counter. In fact, the for-loop is absolutely equivalent to the
following sequence of statements:
<PRE><I>expr1</I>;
while (<I>expr2</I>)
  {
    <I>statement</I>;
    <I>expr3</I>;
  }
</PRE>
That's why <I>expr1</I> and <I>expr3</I> must contain side effects, else they are
useless. For example,
<PRE>for (i=0; i&lt;100; i++) sum += x[i];

for (i=0, t=string; i&lt;40 &amp;&amp; *t; i++, t++) putch(*t);
putch('\n');

for (i=0, sum=0, sumsq=0, i&lt;100; i++)
  {
    sum += i; sumsq += i*i;
  }
</PRE>
All the expressions are optional. If <I>expr2</I> is left out, it is assumed to
be 1. <I>statement</I> may be a compound statement as well.
