Skip to content

__struct_levels_to_print__

builtin · libnexusinterp/nexus-value/ov-struct-proprietary.cc

: val = __struct_levels_to_print__ ()
: old_val = __struct_levels_to_print__ (new_val)
: old_val = __struct_levels_to_print__ (new_val, "local")

Read or change how many levels of nested structure are shown when a structure is displayed.

With no argument the current depth limit is returned. Supplying new_val sets a new limit and returns the one that was in force beforehand. Fields nested more deeply than this limit are summarized rather than expanded in full.

Invoked inside a function with a trailing "local" argument, the new setting applies only to that function and anything it calls, and the previous setting is restored automatically when the function returns.