TRACE (TAA 1/31/77) Read MUDBUG;TRACE ORDER first. The new TRACE works by SETG'ing the given atom to its old gval, chtyped to a new type: one of TSUBR, TRSUBR, TRSUBR-ENTRY, and TFUNCTION. These types all have an APPLYTYPE of a function which performs all tracing functions. Therefore very little structure is created when something is traced, and one can still examine/edit the traced object directly. The printtypes of TRSUBR and TRSUBR-ENTRY are RSUBR and RSUBR-ENTRY, respectively, so they will continue to print as if they are RSUBRs/RSUBR-ENTRYs. The information used by TRACE is stored in a vector which is PUT on the new GVAL of whatever is traced under the TRACE indicator. This vector is of type TSTRUC!-ITRACE, and has a printtype which associates option names with the current setting of each. Thus FOO IN-BREAK: #FALSE () IN-PRINT: T OUT-PRINT: T OUT-BREAK: #FALSE () VERBOSE: #FALSE () The behavior of TRACE with respect to a particular function may be modified by PUTting into this vector in the appropriate slot: thus ,IN-BREAK T> will cause FOO to break on entry. The GVALs of IN-BREAK, IN-PRINT, OUT-PRINT, OUT-BREAK, and VERBOSE are offsets into the vector. Killing the vector (by saying ) is NOT a suitable method of untracing; it is, in fact, fatal. The vector stores the old value of the object traced, which is necessary to untrace it since one cannot CHTYPE into SUBR's, RSUBR-ENTRY's, and so on. INDENTing is global over all traced functions. In a sacrifice of speed for tastefulness, this has been changed such that each call to a TRACEd function binds INDENT as a special variable. Thus,  or ERRET will leave you in a winning state with respect to indenting. Unassigning INDENT (or setting it to <>) has the effect of turning off indenting for all nested calls; once you pop out of whatever level you were at when this occurred, indenting will be restored. Thus, it is very difficult to completely turn off indenting while you're running programs. If an option is provided as something other than an atom or false, the object provided will be EVAL'ed each time the function is called; it is therefore possible to change the behavior dynamically. Of course, hacks such as <>> are perfectly legal. For greater convenience, the LVAL of TRACE-ARGS is the TUPLE of arguments to a traced function during its execution: any predicate may examine this. Similarly, the LVAL of TRACE-VAL is the value returned by the function, which may be examined by predicates supplied for OUT-BREAK and OUT-PRINT.