home *** CD-ROM | disk | FTP | other *** search
- ############################################################################
- #
- # File: adlfirst.icn
- #
- # Subject: Program to write first line of addresses
- #
- # Author: Ralph E. Griswold
- #
- # Date: May 22, 1992
- #
- ###########################################################################
- #
- # This program writes the first lines 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, line
-
- s := cset(arg[1]) | &cset
-
- while line := read() do
- line ? {
- if any('#') & upto(s) then {
- while line := read() | exit() do
- if line[1] == ("*" | "#" ) then next
- else {
- write(line)
- break
- }
- }
- }
-
- end
-