Go to the first, previous, next, last section, table of contents.

TRACE Pragma

The TRACE pragma may appear at the end of any variable or formal declaration. This pragma will generate tracing calls whenever the declared variable is modified. The trace-proc must evaluate to a procedure of two arguments. The first argument is the name of the traced variable, a TEXT. The second argument is the traced variable. Note that any of the formal passing modes may be used with the second argument.

The pragma <*TRACE stmt-list*> may appear immediately after any BEGIN. The specified "stmt-list" will be inserted after each statement of the block started by the BEGIN.


Example

will cause

to be generated after each statement that modifies x. Variable aliasing is not tracked, so

will not generate any tracing.


Example

The fragment:

will generate INC(cnt); MyTrace(cnt) after each of the assignment statements.


Go to the first, previous, next, last section, table of contents.