Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Language Overview > Siebel eScript Statements > for StatementThe for statement repeats a series of statements a fixed number of times. Syntaxfor ( [var] counter = start; condition; increment ) UsageThe counter variable must be declared with var if it has not already been declared. If it is declared in the for statement, its scope is local to the loop. First, the expression Within the loop, the value of counter should not be changed, because changing the counter makes your script difficult to maintain and debug. A for statement can control multiple nested loops. The various counter variables and their increments must be separated by commas. For example: for (var i = 1, var j = 3; i < 10; i++, j++) ExampleFor an example of the for statement, read eval() Method. See Also |
Siebel eScript Language Reference |