			W32LCnt

			Overview
When developing a Delphi or a Pascal project, it is often necessary to
measure development progress. As a general rule, some type of line 
count is the most convenient measure of progress. Though other
statistical measurements may be more technically accurate, line counts
are generally the easiest to compute and understand [1]. 

If a reasonably consistent formatting style is used throughout a 
project, line counts can be divided by the number of expended development 
hours to yield a estimator. When multiplied by the projected program size
(in lines), the estimator yields an estimate of total development time.

Successive estimators on a single project can provide increasingly better
estimates of total required time to completion. Estimators across a number
of projects can be combined (as an average) to provide an estimator for 
new projects. 

W32LCnt reads one or more Delphi (or traditional Pascal) source files
including files with DPR, PAS and INC file extensions. If the source 
file has an associated DFM (Delphi ForM) file, the DFM is read and 
measurements are made.

			Required Files
W32LCNT.ZIP contains two files, W32Lcnt.exe (the executable) and 
LnCount.txt (this file).

			Using W32LCnt
The user interface for W32LCnt consists of a single dialog box with 3
buttons and 3 check buttons. 

Clicking the "Select File" button allows the selection of a file to be 
processed. The selected file may be either a source file or a text file 
that contains a list of files to be processed. When processing a file 
that is a list of files, each file name should occupy one line. A file
that contains a list of files can be prepared from the DOS box by use 
of the following command:

dir /b *.pas | sort > files.txt

which instructs the DIR command to use the "bare" format (the file name 
with no extraneous or additional information) for all pas files in the 
current directory. The list of pascal file names is sorted and written
to the file "files.txt"

The selected file (with path) is shown to the right of the "Select File"
button.

If the "File is a list of files" check box is checked, the selected file
is treated as a text file that contains a list of files to be processed.
If unchecked, the selected file is assumed to be a source file.

The "Detailed Report" check box selects the report format. If the "File
is a list of files" check box is checked, the "Detailed Report" check 
box is marked automatically.

If "Use WordPad" is checked the report is displayed using WordPad. If 
unchecked, the report is shown with NotePad.

Clicking the "Cancel" button terminates W32LCnt.

The "Count Lines" button is disabled until a file is selected with the
"Select File" button. Clicking the button causes the file (or files) to
be read. If any of the source files have an associated DFM, that file 
is also read. The report for the files that comprise W32LCnt project is 
shown below:

W32LCnt (Win32 v:0.6)     Copyright (c) 1992-1998 by RP & KSB
  Count the number of blank lines, comment lines, source lines
  and commented source lines in a Pascal (or Delphi) source file.

  Note: "{}" also called "bubbles" are not counted.
  [A "bubble" is an open brace immediately followed by a close
  brace. They are normally used as spacers for nested routines]

                           Line Count Detailed Report
                                             all    commented
          name    Blank  %   comment  %    source  %    source   %  %S    total
-------------- -------- --- -------- --- -------- --- -------- --- --- --------
   FrmMain.pas       42  19       44  20      137  61       20   9  15      223
  LCntEngn.pas      157  16      226  23      602  61      127  13  21      985
   W32LCnt.dpr        3  20        1   7       11  73        0   0   0       15
  Wstr0100.pas      184  18      352  34      488  48      106  10  22     1024
-------------- -------- --- -------- --- -------- --- -------- --- --- --------
         TOTAL      386  17      623  28     1238  55      253  11  20     2247

 4 files processed.
 %S :: per cent of source lines containing inline comments.

                           FORMS Detailed Report
                name      Objects        Lines         Size
--------------------     --------     --------     --------
         FrmMain.dfm           10          119         1991
--------------------     --------     --------     --------
               TOTAL           10          119         1991

 1 forms processed.


[1] Some other measures are complexity measurements, Function Points 
and Feature Points. See "Applied Software Measurement : Assuring
Productivity and Quality" (1991) by Capers Jones.

Barry W. Boehms' "Software Engineering Economics" describes the classical
COCOMO software estimatation model. COCOMO is based on source line 
counts... along with other factors.
