Iteration Statements

Iteration statements implement one method of flow control in Scenome Scripting Language.

Details

Details are as follows:

Examples

This example uses a for loop to execute a statement 10 times. It prints the values 1 through 10 to the Scenome application's output window.

for( int x = 0; x < 10; ++x )
{
   Application.Log.LogString( x + 1 );
}

This example uses a while loop to execute a statement 10 times. It prints the values 10 through 1 to the Scenome application's output window.

int x = 10;
while( x != 0 )
{
   Application.Log.LogString( x );
   --x;
}