NAGWare Fortran Tools - f77 Tools - nag_fxref

 

Index

NAME
DESCRIPTION
OPTIONS
MEANING OF THE CROSS REFERENCER OUTPUT
LOCAL CROSS REFERENCE KEY
GLOBAL CROSS REFERENCE KEY
RESTRICTIONS
SEE ALSO
 

NAME

nag_fxref - Cross Referencer

 

DESCRIPTION

nag_fxref is the NAGWare f77 Tools variable cross referencer. This tool can be used to produce a table of the cross references of the symbols in each program unit and also a global cross reference of all the symbols.

 

OPTIONS

"Wide Output Listing" (-wide)

By default nag_fxref constructs tables 80 characters wide. If the -wide option is used nag_fxref uses 120 columns for constructing the tables.

"Add a key to the output" (-key)

If the -key option is specified, the output will contain a key of the cross referencer output as described below.

 

MEANING OF THE CROSS REFERENCER OUTPUT

The nag_fxref output consists of two parts. The first is a cross reference table for each of the program units contained in each file. The second stage gives a global cross reference of all symbols appearing in each file.

The first section of the output is headed "Label Index for <Routine-Name>". Unnamed main programs are given the name "$MAIN" and unnamed block data subprograms are called "$BLOCK". This section of the output consists of three columns headed in turn by Label, Defined and Referenced. The first column contains a list of all the labels in the program unit. The second column contains the line number on which it appears and the third column a list of line numbers where the label is referenced by a statement, e.g. by a GOTO statement. This section is not displayed for a program unit which does not contain any labels or references to labels. If a label is found which is not referenced a warning is placed on standard error.

The second section contains a cross reference table for the symbols which appear in the program unit. The section is titled "Symbol Cross-Reference for <Routine-Name>". Two columns entitled "Symbol" and "Referenced" are then displayed. The first column contains the name of a symbol, for example "I", and the second contains a list of line numbers in which the symbol appears. The line numbers may be followed by certain characters which have interpretations as described below.

The third section entitled "Global Symbol Cross-Reference" contains a list of symbols in one column and a second column containing the names of program units in which they are referenced. The name of the routine will be followed by a single letter preceded by a star which indicate how the symbol is referenced.

 

LOCAL CROSS REFERENCE KEY

The second table for each program unit (as described above), contains a list of line numbers for each symbol possibly suffixed by a character or characters.

The following characters may follow the line number:

#
The '#' indicates that the symbol is defined on this line.
+
When a '+' follows the line number, this indicates that the symbol is declared on this line.
~
A '~' indicates that the symbol is referenced on this line.
*
When a '*' follows a line number, this indicates that the symbol is set on this line.
A
An 'A' following the line number indicates that the symbol is used as an argument to function or subroutine on this line.
D
If a 'D' appears after the line number this indicates that the symbol is present in a data statement on this line.

These symbols can also be followed by number enclosed in brackets. If this is so, this indicates that the line number applies to an include file. The appropriate include file can be deduced by checking the key which appears under the local cross reference table.

 

GLOBAL CROSS REFERENCE KEY

*B
The letter 'B' after the routine name in the Referenced column, means that the symbol name is the name of a COMMON block.
*C
The letter 'C' after the routine name in the Referenced column, means that the symbol name is referenced in a COMMON block in this routine.
*D
The letter 'D' after the routine name in the Referenced column, means that the symbol name is a dummy argument.
*E
The letter 'E' after the routine name in the Referenced column, means that the symbol name is used in an EQUIVALENCE statement.
*L
The letter 'L' after the routine name in the Referenced column, means that this is a local symbol in the named routine.
*P
The letter 'P' after the routine name in the Referenced column, means that the symbol name is present in a PARAMETER statement
*R
The letter 'R' after the routine name in the Referenced column, means that the symbol name is a SUBROUTINE or FUNCTION name or an ENTRY point.
*S
The letter 'S' after the routine name in the Referenced column, means that the symbol name is a statement function which appears in this routine.
*X
The letter 'X' after the routine name in the Referenced column, means that the symbol name is an external.
 
 

RESTRICTIONS

nag_fxref recognises the ANSI standard Fortran 77 intrinsic functions, the US Military Standard intrinsic functions, and the double complex intrinsics defined in nag_Fortran77.

The output from nag_fxref will appear incorrectly alligned, but not unreadable, if more than 99 INCLUDE files are called from any one program unit.

Alignment may also suffer if a file contains more than 999999 lines of code.

 

SEE ALSO

nag_Fortran77

Copyright, Numerical Algorithms Group, Oxford, 1991-2001