home *** CD-ROM | disk | FTP | other *** search
- ############################################################################
- #
- # File: adlcount.icn
- #
- # Subject: Program to count address list entries
- #
- # Author: Ralph E. Griswold
- #
- # Date: September 2, 1991
- #
- ###########################################################################
- #
- # This program counts the number of entries in an address list file.
- # If an argument is given, it counts only those that have designators
- # with characters in the argument. Otherwise, it counts all entries.
- #
- ############################################################################
- #
- # See also: address.doc, adlcheck.icn, adlfilter.icn, adllist.icn,
- # adlsort,icn, labels.icn
- #
- ############################################################################
-
- procedure main(arg)
- local s, count
-
- s := cset(arg[1]) | &cset
-
- count := 0
- every !&input ? {
- any('#') & upto(s) \ 1
- } do
- count +:= 1
- write(count)
-
- end
-