Contents | Index | < Browse | Browse >

usage: TRACE(option)
default: TRACE() = TRACE('n')

-sets the tracing mode to specified option.
-mode can be altered even during interactive tracing
-TRACE() and TRACE(option) both return the trace mode in use BEFORE the call is made, but TRACE() can also be used to discover the current trace mode in use:

example: var = Trace()
sets 'var' to the current trace mode as if it were set by
supplying the argument 'n', but returns the prior mode in
the variable 'RESULT'.

example: trace('a')
sets the trace mode to 'ALL' but returns the prior
mode in the global variable 'RESULT'.

example program:
/* Show results from trace() command...*/
options results
call trace('a') /* sets result to N */
say '1.' rc result /* proved in this line */
say '2.' trace() /* outputs A as current mode in use...*/
say '3.' rc result /* but still shows N as prior mode */
say '4.' trace() /* outputs A as the current mode...*/
call trace('n') /* sets N as current mode but...*/
say '5.' rc result /* sets result to A as prior mode!*/
say '6.' trace() /* outputs N as current mode BUT
sets result to A as the prior mode!*/

-see Tracing options and RexxC