An iteration setup, usually a variable with an initial value.
The condition to test.
Any Gamma expression, usually used to increment the variable in setup.
Any Gamma statement.
This statement is essentially identical to a for loop in C, and the syntax is the same. It checks a condition iteratively, and executes a statement when the condition is true.
This for loop counts from 0 to 10, printing out the value of i as it loops.
for (i=0;i<=10;i++)
{
princ("value of i: ", i, "\n");
}
See the Starting qserve and nserve section of the Common Functions chapter in the Cogent Tools Demo and Tutorials book for an example of this statement used in context.