HotkeyNet: the next generation
REFERENCE
for

Creates a loop.

Syntax

for ( declaration | expression; expression; expression )
   ... ;

      or

for ( declaration | expression; expression; expression )
{
    ...
}

Remarks

One or more of the expressions can be omitted. If all three are omitted, the loop continues to run until you exit with break or return.


Examples

for ( var x = 0; x < 10; x = x + 1 )
    print ( x );


var x = 0;

for (;;)
{
    print ( x );
    x = x + 1;
    if ( 9 < x )
        break;
}


Related topics

break
continue
while


This page was last revised on June 14, 2009
Copyright © 2009 HotkeyNet Software