Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Language Overview > Functions in Siebel eScript > Function Recursion in Siebel eScriptA recursive function is a function that calls itself or that calls another function that calls the first function. Recursion is permitted in Siebel eScript. Each call to a function is independent of any other call to that function. However, recursion has limits. If a function calls itself too many times, a script runs out of memory and aborts. Remember that a function can call itself if necessary. For example, the following function, factor(), factors a number. Factoring is a good candidate for recursion because it is a repetitive process where the result of one factor is then itself factored according to the same rules. function factor(i) //recursive function to print factors of i, |
Siebel eScript Language Reference |