The for loop syntax is as follows:
for( <initializer> ; <condition> ; <increment> ) {
<actions>
}
For example:
for(n = 0; n<100; n++) {
PRINT String.forInteger(n)
}
The example above would print numbers 0 .. 99. Note that this assumes that the variable "n" has been previously declared. If a new variable is to be used, it can be declared as part of the statement:
for(var n = 0; n<100; n++) {
PRINT String.forInteger(n)
}
The parenthesis following the "for" keyword are NEVER optional, and must always be present. If one or all of the three expressions inside the parenthesis are not present, the semicolons must still be supplied. For example:
for( ; true ; ) {
PRINT "this is an infinite loop"
}