HTBasic Help
×
Menu
Index

XREF

Generates a cross reference of a program.
 
 XREF [ [SUB] sub-name] [: option]
XREF [#device-selector [; [SUB] sub-name]] [: option]
 
 
 
Usage:
XREF
XREF Trigger:NV
XREF #701;Launch
Description:
XREF generates a cross reference list of line labels and numbers, io-path names, numeric and string variables, subprograms, functions and COM block names. It also lists the number of unused symbol table entries. The listing is sent to the PRINTER IS device unless a device selector is specified.
Optional parameters include:    
            
Option
Meaning
CM
Common Block Names
IO
I/O Path Names
LL
Line Labels
LN
Line Numbers
NF
Numeric Functions
NV
Numeric Variables
SB
SUB Subprograms
SF
String Functions
SV
String Variables
UN
Unused Entries
 
If a reference is a SUB parameter, declared in a COM, COMPLEX, DIM, REAL or INTEGER statement or a line label, it is marked by the "<-DEF" marker. After each program context, the number of unused symbol table entries is displayed. If the subprogram name is specified as MAIN, the MAIN context is cross-referenced.
If the program has been pre-run, array variables will be noted as Array next to the defination line
number.
 
Subprogram Pointer
If a string expression specify the subprogram name in the XREF statement, the string expression is called a subprogram pointer because it "points" to the subprogram rather than explicitly naming it. As the expression changes, the pointer points to different subprograms. The subprogram must be specified with the initial character in uppercase, and subsequent characters in lowercase. Subprogram pointers can also be used in CALL, DELSUB, INMEM, and LOADSUB statements.
 
See Also: