For

From Game Editor

Revision as of 09:38, 31 August 2008 by Edh (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The for statement, like the do and while statements, is used to execute a block of code repeatedly.

The syntax of the for statement is like this:

for ( initialization ; test expression; update expression )
  statements;

The initialization, test expression, update expression are optional.

This is an infinite for loop.

 for ( ; ; )
   statement;

The code in statement would be executed until a break statement was executed.

Retrieved from "http://game-editor.com/For"