Local Reports

Local reports detail name classification, type and locations where the name was declared, typed, set and referenced - according to the information requested in the report. If the name is equivalenced, then locations where any alias names are set or referenced are also included, to pinpoint every location relating to the name's usage. When the name is used in a common, the common label is displayed (in slashes) with the name. If an array, the original FORTRAN dimensions are displayed after the name. Parameters are followed by their constant value, and if a function or subroutine reference (i.e., call), the names are followed by "()".

Each report heading contains the routine name in the phrase "IN FUNCTION name()" or "IN SUBROUTINE name()". The primary filename where the routine is located is displayed following the Location column title in the report heading.

Depending on the local report options (LREPT) set, the local reports will indicate all qualifying names present in the routine, or will be limited to qualifying names present in the primary file, i.e., names defined only in include files are excluded from the report. The various local reports include:


Cross Reference

Cross references of all names in the routine are provided in this report - subject to the possible limitation of primary file only. This report is similar to those generated by most compilers, but with more information, and is perhaps less confusing. The report may be limited to names present in the primary file. The more verbose form may highlight mismatches between names expected in the include file and the names actually used in the primary file. For example, referencing the parameter PI (expecting it to be defined in an include file, but actually defined as PIE) will now be highlighted with the more complete form. If you haven't seriously reviewed your code in some time, the more verbose form is recommended. Afterwards, the shorter form may be used with less risk.

The names are normally displayed in uppercase to conform to standard Fortran coding styles. The exceptions are dummy arguments, which are displayed in lowercase to indicate their alias nature. When reporting the function name return "variable" in a FUNCTION, variable usage of the function name is reported with the string "::return". For example, the return variable for FUNCTION FOO() will be displayed as "FOO::return". If the name is an array, original dimensions are displayed after the name (as in a dimension statement). When the name is in a common, the common label, surrounded by slashes, is displayed after the name (or prior to it, as with a common statement). If the name is equivalenced, it followed either by "[eqv]" or by "[eqv leader_name + offset]". The first form is displayed when the name itself is the equivalence leader. If the name is a pointer variable, it is followed by its pointer based variable, "[->ptrbased_var]". Conversely, a pointer based variable is followed by its pointer variable, e.g., "[<-pointer_var]". If the name is a parameter, the parameter value is displayed for parameters with integer, logical, or real typing. If the name is a function, subroutine, intrinsic, or statement function, then it is followed by "()" to indicate the function nature of the object. Names in the reports are displayed in alphabetical order when the "S="a"" option is on (as distributed); otherwise, they are displayed in the order first encountered in your source.

The class column denotes the FORTRAN classification (variable, array, function, etc.). An uppercased type, indicates explicit typing, versus a lowercased type for implicit typing. Generic intrinsics are displayed with a type of "[overloaded]" to indicate the return type is determined by the argument type. No type is displayed for subroutines. Cray/Sun style pointers are typed as "pointer", which is an INTEGER*4 with special properties. As distributed, the type and classification are displayed in compact abbreviated form (see the table below for type abbreviations). The Verbose report form option, (V=r) can be set for unabbreviated forms, although report alignment may suffer with names over 12 characters (or when name attributes are present, e.g., the common label or equivalence information).

The line number location displayed in the reports consists of possibly three distinct elements: the filename (if different from the primary filename, as in an include file), the line number, and one or more characters indicating the name's usage on that line. Characters used with the line number location are detailed in the following table:

Line Number Location Keys ------------------------- Symbol Interpretation ------ ------------------------------------------ = name set (lvalue at that location) d name declared (other than explicit typing) e name referenced via an equivalenced name e= name set via an equivalenced name T name explicitly typed t name implicitly typed [none] name referenced directly

The line numbers themselves correspond to the line number at the beginning the FORTRAN statement where the usage occurred. If the statement is long, actual usage may be on a continued line below the stated location.


Implicit Typing Report

Displays names that were implicitly typed in the routine; the report may be limited to the primary file only. The name classification and type are reported, locating where the implicit typing decision was made.


Include File Usage

Displays include file usage in the routine. This report lists include files referenced from the routine, with number of names declared in the include file that were referenced from the primary file. If no references exist, the file need not be included in this routine.


Local Names Set, But NOT Referenced

Displays the local variable, array, and parameter names set, but not referenced in the routine. They do not include common member names, since normal common usage will reference only a portion of members in any one routine, hence overloading the report with erroneous information. In contrast, local names that are set, but not referenced represent variables (and possibly side effects) that may be deleted - especially if no desired side effects are generated from the operation. The report may be limited to names set in the primary file only. Typically only parameters are set in include files, so the key benefit of this second form is to illustrate unused parameters.


Unused Local Names

Displays unused local names, (i.e., names that were declared, but were neither set nor referenced). The report may be limited to names declared only in the primary file. Common names are not included, because not all member names are used in any one routine. Names reported with this option are unnecessary to the program and can be safely removed without affecting program logic. Unused variable names in this report often turn out to be functions that are declared, but not called in the function. They will appear as variables, since most FORTRAN programmers do not use the EXTERNAL or INTRINSIC statement to indicate the name refers to a function. Without the EXTERNAL/INTRINSIC statement, or a call to the function, there is no way to distinguish between an unused local variable name and a function name in standard FORTRAN-77.