Function Definitions

20  -  Debugging

trace ..... Turns trace on for one or more user-defined functions.  This is a debugging aid which traces function calls and results.  When the function is executed, "Entering ..." is displayed on screen with the function name and the value(s) sent to the function.  When the function is finished, "Result: " is displayed with the value(s) returned by the function.

For functions that are nested inside other functions, indentation indicates the level of nesting -- one space indent for each level of nesting.  However, if the function moves the cursor away from the left margin, then the level of nesting is indicated only by the number of spaces before the word "Entering."

(trace dtr) turns trace on for function dtr. When dtr is executed, both the entrance to the function and the result are displayed.

(trace dtr rtd) turns trace on for the two functions dtr and rtd

The arguments represent functions that either are already defined, or will be defined.  The trace function returns the name of the last argument whether or not it is currently defined.

Also see untrace below.


untrace ..... Turns trace off for one or more functions.

(untrace rtd) turns trace off for the given function

Also see trace above.


Also see  *error*  under "21 - Miscellaneous"

 HOME

Copyright © 1988, 1998 Ronald W. Leigh