HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

2-: 51
Software Metrics This section provides statistics about the program.
Many techniques exist for measuring the size and complexity of software
and the amount of structure it contains. The Program Analyst can measure
these features quickly and accurately. The significance of the numbers
is left up to the programmer. The fact that the numbers are generated
should not be considered an endorsement of a particular technique, nor
is
it the intent to pass judgement on the user's code. This section
contains the following information:
Field Contents
Source Lines The number of lines in the subunit. This is the
number of unique line numbers. Continuation lines
are not counted.
Comments The total number of comments including REM
statements, comment lines, and comments placed at
the end of other program lines.
NCSS Non-Comment Source Statements. The number of
program lines that do not consist entirely of a
comment or REM.
Code Volume An attempt to quantify the information content of
(Halstead) a group of source statements, in this case a
subunit or program. Code volume is a number
calculated from the number of unique identifiers
and operators and the number of occurrences of
these identifiers and operators.
Complexity (McCabe) This value is the number of decision points in the
subunit or program, plus one.
Structure Compliance Indicates the percentage of branches that are
(DeMarco) accomplished without explicit GOTO statements.
All of the structured statements are counted as
branches, including each value or range in a CASE
statement.
Statement Frequency The Statement Frequency section lists the 21 most
frequently used statements in the subunit. The statement names are
displayed with the frequency count.
The Optimize Screens. The Program Analyst contains four screens that
are specifically designed to help improve the efficiency of the current
program. The next four sections describe each of these screens.
The Data Types Screen. The purpose of this screen is to provide
information to minimize run-time conversions through more efficient
definitions of variable data types.
This screen displays information for the entire MAIN subunit. The name
of the subunit and the first and last line numbers are displayed at the
top of the screen. A predicted number of conversions is below the
subunit information is shown in a table. The lines with the most
conversions are indicated to the right of the table. The Program Analyst
predicts static conversion numbers. If a statement (such as a FOR
statement) is to be executed multiple times, the Program Analyst counts