Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Language Overview > Siebel eScript Statements > for...in StatementThe for...in statement loops through the properties of an associative array or object. NOTE: The for...in statement can be used with associative arrays, which are arrays that use strings as index elements. The for...in statement is not for use with non-associative arrays. For more information, read Associative Arrays in Siebel eScript. Syntaxfor (LoopVar in object) UsageNOTE: An object must have at least one defined property or it cannot be used in a for...in statement. Associative arrays must have at least one defined element. When using the for ... in statement in this way, the statement block executes one time for every element in the associative array or property of the object. For each iteration of the loop, the variable LoopVar contains the name of one of the elements of the array or properties of object, and may be accessed with a statement of the form NOTE: Properties that have been marked with the DONT_ENUM attribute are not accessible to a for...in statement. ExampleThis example creates an object called function PropBtn_Click () obj.number = 32767; for (propName in obj) Running this code produces the following results. The value of obj.number is 32767. For an example of the for...in statement used with an associative array, read Associative Arrays in Siebel eScript. |
Siebel eScript Language Reference |