TRACE

From TinyMUX
Jump to: navigation, search

FLAG: 20px-Flag.gif TRACE (T)

When an object is set TRACE, it will report to its owner the result of all evaluation that it performs that change the original string. The order for displaying nested evaluations (such as when evaluating the arguments to a function) is a site-selected configuration parameter.

Example

   > @set object = trace
   > @va object = say The result is [add(4,mul(3,%0))].
   > @trig object/va = 7
     object(#322)} '%0' -> '7'
     object(#322)} 'mul(3,%0)' -> '21'
     object(#322)} 'add(4,mul(3,%0))' -> '25'
     object(#322)} 'The result is [add(4,mul(3,%0))].' -> 'The result is 25.'
     object says "The result is 25."

When trace output is displayed in top-down order (final evaluation first, followed by the 'smaller' evaluations needed to perform it), then the total number of trace output lines that may be produced by an evaluation is limited to the value specified by trace_output_limit parameter. Bottom-up trace output is not limited.

Related Topics: VERBOSE, Configuration, Config parameters, trace_topdown, trace_output_limit.

Server differences

In PennMUSH, this flag is called DEBUG and there is no trace_output__limit; PennMUSH has an attribute flag called DEBUG that enables evaluation tracing on a per-attribute basis.