The MERGE command produces a merged list of the references to the specified identifiers.
The COINCIDENCE command produces a list of the places where all the references to the specified identifiers appear on the same line.
Note: | Although the identifiers can be used in the same statement or expression, the statement or expression can be split across a line boundary, in which case the identifiers would not be flagged by the COINCIDENCE command. |
Syntax
──┬─ MERGE ───────┬────────────────────────────────────────────────────► └─ COINCIDENCE ─┘ ┌◄────────────────────────────────────────────────────┐ │ ┌◄──────────── , ────────────┐ │ ►─┴─┬─/1*\─┴─<identifier specification>─┴─────────────┬─┴──────────────┤ ├─/1\─ : ── RANGE ──<range specification>─────────┤ ├─/1\─ : ── CHANGED ──────────────────────────────┤ ├─/1\─ : ── ALIASES ──────────────────────────────┤ ├─/1\─ : ── TEXT ─┬───────────────────────────────┤ │ └─<integer>─────────────────────┤ ├─/1\─┬─ : ── ENVIRONMENTS ─┬──────────┬─┬────────┤ │ │ └─<number>─┘ └─ ONLY ─┤ │ └─ : ── GLOBALENVIRONMENTS ─┬───────────────┤ │ └─ ONLY ────────┤ ├─/1\─ : ── PRINTER ──────────────────────────────┤ ├─/1\─ : ── REMOTE ───────────────────────────────┤ └─/1\─ : ── FILE ──<file name>────────────────────┘
Explanation
<identifier specification>
Specifies the identifiers to be used in the command.
RANGE <range specification>
Produces a MERGE or a COINCIDENCE list of references to the identifiers in the specified range. The default reference range, as specified by the RANGE command, is used if a range specification is not specified. The default value of the RANGE command is the entire program.
CHANGED
When specified with MERGE, causes only references where the value of the identifier might be changed by the statement to be listed.
When this option is specified with COINCIDENCE, it produces a list where all the specified identifiers appear on one line and where one or more might be changed by the statement within which it appears.
ALIASES
When specified with MERGE, produces a list of all references to the identifiers and all their aliases (if any exist).
When the ALIASES option is specified with COINCIDENCE, it produces a list of the locations where all specified identifiers and all their aliases appear.
For either command, sequence numbers where an alias is referenced are marked with a plus sign (+). Currently, only the NEWP language keeps track of aliases.
TEXT
Causes the text from the symbol file to be printed with each reference. If an integer is specified with this option, that many lines of text, centered at the line containing the reference, is displayed with each reference. You must load the symbol file to use this option. Refer to “SYMBOL Command” in this section.
ENVIRONMENTS
When specified with MERGE, produces a list of the names of the environments—procedures and blocks—where the references to any of the specified identifiers occur, appropriately interleaved with the references.
When ENVIRONMENTS is specified with COINCIDENCE, it produces a list of the names of the environments in which all specified identifiers appear on the same line, appropriately interleaved with the references.
When either command is modified by the <number> value, then only <number> levels of environments are listed. When either command is modified by ONLY then only the environments and not the references are listed. ENVIRONMENTS ONLY and TEXT are mutually exclusive options.
GLOBALENVIRONMENTS
When specified with MERGE, produces a list of the names of the global environments (global procedures and blocks) where the references to the specified identifiers occur, appropriately interleaved with references.
When GLOBALENVIRONMENTS is specified with COINCIDENCE, it produces a list of the names of the global environments in which all specified identifiers appear on the same line, appropriately interleaved with the references.
When either command is modified by the number value, then only that many levels of environments are listed. When either command is modified by ONLY, then only the global environments and not the references are displayed. GLOBALENVIRONMENTS ONLY and TEXT are mutually exclusive options.
PRINTER
Sends the output to the line printer by way of a file internally named LINE.
REMOTE
Sends the output to the terminal. This option can be used when PRINTER has been specified so that output is sent to the terminal as well as to the printer.
FILE <file name>
Causes all referenced text lines from the symbol file to be output to a disk file with the specified file name. This file cannot already exist. The file name is created with the same FILETYPE as the file loaded by the SYMBOL command. You must load the appropriate symbol file to use this option.
Examples
The following examples use the example INTERACTIVEXREF program contained at the end of this section.
The following command produces a merged list of references to the identifiers B, C, and MEAN. The references are grouped by the procedures within which they occur, and the name of the procedure precedes each group. The main procedure references are listed first. Text for the references is also printed.
MERGE B, C, MEAN: ENVIRONMENTS: TEXT B :: REAL (2,3) :: DECLARED 00001200 C :: REAL (2,3) :: DECLARED 00001200 MEAN :: REAL (2,4) :: DECLARED 00001200 *00005400 B:= 3; *00005500 C:= 25; *00005800 B:=5; ONE: *00002400 MEAN:=2; *00002600 MEAN:= MEAN * B; *00002700 C:= C * MEAN; TWO: *00004200 MEAN:= MEAN / 3; *00004800 C:= 43; THREE OF TWO: *00003900 MEAN:= MEAN + C;
The following command produces a list of statements where the value of B or C might change:
MERGE B, C: CHANGED: TEXT B :: REAL (2,2) :: DECLARED 00001200 C :: REAL (2,3) :: DECLARED 00001200 *00002700 C:= C * MEAN; *00004800 C:= 43; *00005400 B:= 3; *00005500 C:= 25; *00005800 B:=5;
The following command produces a list of statements where both B and MEAN appear:
COINCIDENCE B, MEAN:TEXT B :: REAL (2,2) :: DECLARED 00001200 MEAN :: REAL (2,4) :: DECLARED 00001200 *00002600 MEAN:= MEAN * B; %