WORDCNT - Written 01.28.96 SZ Starbase Corporation

INTRODUCTION

This archive contains a Codewright add-on module that can be used to
count the number of occurances of a word or phrase in a document.

This documentation applies to version 5.0 of Codewright, although the
module should work with 4.0, 5.0, 5.1, 6.0, 6.5 and 6.6.

INSTALLATION

Create a WORDCNT directory below your main Codewright directory, and
extract the files there (be sure to recreate the archive's directory
structure). 

To install the module, copy the correct DLL file to your 
CodeWright directory.  Load the DLL.   

 	Using CW 5.1 go to Tools|Libraries
 	Using CW 6.0 go to Tools|Customize|Libraries
 	Using CW 6.5 go to Customize|Libraries

	From the Load CodeWright DLL dialog, manually add the DLL. 

USAGE

Go to Tools|API Command (or press the key associated with this option,
for example F9 in the CUA keymap). Type

        CountPhrase="expression"

The number of occurances of "expression" will be counted, and the result
will be displayed on the status line. The options you have configured in
Search|Options will be used, so the expression can be a regular expression,
or case sensitive, etc.

DETAILS

WORDCNT.DLL exports the following functions which you can use.

        CountOccurances() - Takes one parameter, the string you would
                            like to count. Returns a long value indicating
                            the number of occurances found. This function
                            does not display the result on the status line.

        CountPhrase() - This function does the same as CountOccurances(),
                        but also displayed the result on the status line.

INCLUDED FILES

        README.TXT        - This file
        WORDCNT.C         - The source code
        WORDCNT.RC        - A dummy resource file
        WORDCNT.          - Microsoft makefile
        WORDCNT.MAK       - Borland makefile
        WIN32\WORDCNT.DEF - 32-bit .DEF file
        WIN32\WORDCNT.DLL - 32-bit .DLL file

FEEDBACK AND SUPPORT

Send e-mail to support@starbase.com, or call 800.647.9902.
