contents   index   previous   next


The depth of the function. As you go deeper into the stack, the depth gets smaller. The depth from any particular stack info object is the number of stack objects in total. For instance, if a script is in a wrapper function called from the main body of the stack, then the call stack comprises two levels, SE.STACK_INFO(0) and SE.STACK_INFO(1). The SE.SI_DEPTH is indication of how many function calls are nested beneath this level, including the level itself. In this case, the SE.SI_DEPTH of SE.STACK_INFO(0) will be 2, indicating 2 items nested. The SE.SI_DEPTH of SE.STACK_INFO(1) will be 1, as this function has only itself and nothing nested beneath it. The depth can be 0 if SE.STACK_INFO(0) is used while no code is executing and thus no function calls are nested at all.