[prev] 35 [next]

For-loops

for encapsulates a common loop pattern:

init;
while (cont) {
   do something;
   incr;
}

as

for (init; cont; incr)
   do something;