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. Even though it is declared in the for statement, its scope is local to the whole function that contains the for loop. First, the expression Within the loop, the value of counter should not be changed in ways other than being incremented on each pass through the loop. Changing the counter in other ways makes your script difficult to maintain and debug. A for statement can control multiple counters in a loop. 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, see eval() Method. See Also |
Siebel eScript Language Reference |