Turns the output of cross-reference information on or off during parsing and compiling.
SET XREF ON|OFF
The XREF option is set OFF by default.
When XREF is ON, the software sends dependency information to the current output when an application program is parsed or compiled. One line of output is generated for every object explicitly referenced by the program. The information is not saved (unlike the information produced when SET DEPENDENCY is ON).
The SET XREF command is not affected by the SET RESET and SET RESTORE commands.
Each line of output contains six sections of information, with fourteen fields in total:
- Section 1 consists of one field that contains the output flag.
- Section 2 contains information about the specific object that is being parsed or compiled. This section consists of three fields, the Document Name (name of program), the Object Type (for the document name) and the Zim Directory Name (directory in which the object is located).
- Section 3 contains information about the ownership of the specific object that is being parsed or compiled. This section consists of three fields, the owner Object Name, the owner Object Type and the owner Object Directory.
- Section 4 contains information about the internal object (object within a specific object ) that is being parsed or compiled. This section consists of three fields the internal Object Name, the internal Object Type and the internal Object Directory.
- Section 5 contains information about the owner of the internal object that is being parsed or compiled. This section consists of three fields, the Object Name of the internal object owner, the Object Type of the internal object owner and the Object Directory of the internal object owner.
- Section 6 consists of one field that contains the line number or sequence number in which the reference occurred.
A simple application program can contain the following two lines:
% This is a test program named ServBye
list fields format SN FieldName
In which case, the commands shown below produce the indicated output:
> set xref on
> set output terminal
> parse ServBye
P ServBye Document ZIM ZIM Directory ZIM Documents EntitySet ZIM ZIM Directory ZIM 1