tracelevlimit
tracelevlimit( [x_depth] ) =>t
Description
Limits the indentation level and hence the call depth while tracing functions, arrays, or variables.
Specifying x_depth traces the properties till level x.
Arguments
Value Returned
Examples
If we define several functions, such that each function in turn calls another function, the call depth can be limited using tracelevlimit(x_depth).
defun(func_a() var_a=1 putprop('var_aa 1 'prop_x) println("A") t)
defun(func_b() var_b=2 putprop('var_bb 1 'prop_x) println("B") func_a() t)
defun(func_c() var_c=3 putprop('var_cc 1 'prop_x) println("C") func_b() t)
defun(func_d() var_d=4 putprop('var_dd 1 'prop_x) println("D") func_c() t)
We can set the indentation level as 2:
tracelevlimit(2) => t
So, when we call func_d(), the ouput will be:
|func_d()
||putprop(var_dd 1 prop_x)
||putprop => 1
||println(“D”)
D
||println
=> nil
||func_c()
"C"
"B"
"A"
||func_c
=> t
|fun_d
=> t
t
Related Topics
Return to top