SCOPER B.06 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. Shareware users can use the SCOPER report to manually remove dead code in their VB3 projects. 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, VBSQL.BI, etc. containing ONLY the elements your project needs. Registered users can have SCOPER produce an optional cross reference report, filtered by any desired combination of scope and object type. 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 SCOPER.HLP 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. If you are a shareware user and wish to receive a registered copy of SCOPER, click on "ORDER FORM". If you do NOT want unused functions and subroutines to be identified by SCOPER, turn off "CHECK UNUSED FUNCTIONS/SUBS" check box. REGISTERED USERS: If you intend to browse or print cross-reference data for the project check the "SAVE CROSS-REF DATA" checkbox. 2. From the SCOPER screen click SELECT PROJECT. Pick the project .MAK file you want analyzed. SCOPER normally checks for unused elements of all combinations of type and scope. If you want to filter this checking, click the OPTIONS button to customize the checking SCOPER will do. 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 "DEAD CODE" 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. When the summary stats screen is displayed, you can double-click on any filename to drill-down to more detailed statistics about any form or module in the 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. REGISTERED USERS: If you checked the "SAVE DATA FOR CROSS-REF" checkbox, the "CROSS-REF" button will be enabled. click this button to bring up the cross-reference form. Note that the cross-reference data can be filtered by scope and type using the check boxes on the bottom of the form. 8. 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. B.06 Bug Fixes and Enhancements: 1. Prior releases were marking "Sub Main" as unused even when it was the project startup routine. This has been fixed. 2. Context-sensitive on-line help is now available. 3. Options checkboxes are now available to turn SCOPER unused checking on/off for all combinations of type and scope. Several users asked for this to prevent the constants and declarations in CONSTANT.TXT and WIN30API.TXT from being checked until the project is nearing completion. 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 Voice: 1-800-447-ISES