TRACE
SUNDB86x Only
The TRACE compiler directives indicate the currently executing line numbers and each line's flag settings. Depending on the TRACE method chosen, the information is sent to the normal print output destination or appended to the system error variable (S$ERROR$ - See Common Data Items and Runtime Error Codes). Due to the extra code generated for each compiled line, TRACE Directives should only be used for testing and not within production programs. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
method
Required. One of the following TRACE keywords: ERROR, LINE, OFF.
Flags Affected: NONE
Note the following:
{method} must be one of the following keywords:
|
Keyword |
Affect |
|
OFF |
deactivates any active TRACE methods. |
|
LINE |
generates code to print the tracing information. It is directed to the current print device. |
|
ERROR |
generates code to append the tracing information to the system error variable (S$ERROR$) for each consecutive compiled line. |
Only the compiled lines immediately between the initiating and terminating directives are affected. Tracing does not continue if program control is passed outside of the boundaries of the initiating and terminating directives (i.e., does not bridge a CALL, GOTO, etc., to lines of code outside of those between the two directives).
See Also: Example Code, DEBUG, Compiler Directives
![]() |