WORDCNT - Written 01.28.96 SZ Premia 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.

INSTALLATION

Create a WORDCNT directory below your main Codewright directory, and
extract the files there (be sure to recreate the archive's directory
structure). Launch Codewright, and select Tools|Libraries. Click on Add.
Go to the WORDCNT\WIN16 or WORDCNT\WIN32 directory (whether you're running
the 16- or 32-bit version) and open WORDCNT.DLL. Click Ok on the Libraries
dialog.

USAGE

Go to Tools|API Comment (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
        WIN16\WORDCNT.DEF - 16-bit .DEF file
        WIN16\WORDCNT.DLL - 16-bit .DLL file
        WIN32\WORDCNT.DEF - 32-bit .DEF file
        WIN32\WORDCNT.DLL - 32-bit .DLL file

FEEDBACK AND SUPPORT

Send e-mail to smz@premia.com, or call 800.647.9902.
