SCOPER B.04

SCOPER analyzes VB3 project source modules and
identifies variables, constants, function -
subroutine declarations and code that are 
never used. All project source modules must be
saved as text.

Use the SCOPER report to manually eliminate 
dead code and create the smallest, fastest 
.EXE possible for your project.
 
Registered users can have SCOPER automatically rewrite their code
(in a different directory) eliminating all unused
elements. In a few seconds, The registered version 
will create a new copy of your project, including
custom CONSTANT.TXT, WIN30API.TXT, etc., containing
ONLY the elements your project needs.  

In the corporate development environment, use
SCOPER as the final project check before
production cutover. Make sure production .EXE's
are not riddled with dead code and wasted space. 

TO USE: Copy the SCOPER distribution files into
any directory you wish. The files are:

	SCOPER.EXE
	SPREAD20.VBX
	QPRO200.DLL

1. Execute SCOPER.EXE from windows. 
If you are using an evaluation copy Click "I
AGREE" on the SCOPER evaluation form.

2. From the SCOPER screen click SELECT
PROJECT. Pick the project .MAK file you
want analyzed. Click SCOPER to start analysis.

3. While running, SCOPER displays two progress bars.
The left bar represents progress for the source
module currently being analyzed. The right bar
displays progress for the entire project.

4. When SCOPER is done, click PRINT if a hardcopy unused
element report is desired. Click SAVE TO FILE
to create a tab-delimited file suitable for
importing into Excel, etc. Click STATS to display
interesting statistics about your project.

5. REGISTERED USERS: The "SELECT PATH" button will be 
enabled. Click this button to select the target 
directory for the new project source.

6. REGISTERED USERS: Once the target path is selected,
the "AUTO-REWRITE" button will be enabled. Click this
button to have SCOPER create new source code for your
project, automatically eliminating unused variables,
constants, declarations, and dead code.  

7. If you want another project analyzed,
return to step 2. If not, click EXIT.

NOTES FOR REGISTERED USERS:

SCOPER will NOT modify any original source modules. The
Auto-Rewrite process begins by copying everything from
the original project directory into the target directory.
If any modules need to be re-written that were NOT in the
original directory (e.g., CONSTANT.TXT is usually in the
VB directory), SCOPER will write the new module in the 
target directory and modify the new project .MAK file
accordingly.

Also, it is a good idea to run the rewritten project through
SCOPER after the auto-rewrite process completes. This will
catch situations where a module or global scope variable is
only used in a routine that is never executed. SCOPER will
eliminate the unused routine during the first rewrite, but
the variable will remain part of the project. When the 
rewritten project is run through SCOPER, the variable will
be identified as unused and will be eliminated.

The above situation becomes very interesting when one considers
the fact that it can involve an infinite number of dimensions.
For example, suppose routine-A calls routine-B, and routine-B
calls routine-C. Assume that routine-A is never called. On the
first iteration, SCOPER will eliminate routine-A but not routine-B
and routine-C. On the second iteration, SCOPER will eliminate
routine-B (assuming it is not called by any other routines) but
not routine-C. On the THIRD iteration, SCOPER will eliminate
routine-C (assuming it is not called by any other routines). Thus,
it is a good idea to SCOPE the project until it comes up clean
(no unused elements). 95% of the time, this will happen after the
first iteration.

A brief note on how the SCOPER rewrite engine handles recursion:
If routine-A calls itself but is not called by another routine,
SCOPER will eliminate routine-A since it is dead code. However,
if routine-A calls routine-B, and routine-B calls routine-A, SCOPER
will not eliminate either routine since both are, technically
speaking, referenced outside their own local scope.

Please use U.S. Mail, Compuserve e:mail or fax to let us know 
what enhancements you would like to see in future SCOPER releases.

Thanks.

SCOPER Copyright(c) 1995 by ISES, Inc. ALL RIGHTS RESERVED
102 Sunrise Drive
Gillette, NJ 07933
Compuserve: 72417,627
Fax: 908-580-1008
