home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
historic
/
v941.tgz
/
icon.v941src.tar
/
icon.v941src
/
ipl
/
progs
/
adlfirst.icn
< prev
next >
Wrap
Text File
|
2000-07-29
|
1KB
|
46 lines
############################################################################
#
# File: adlfirst.icn
#
# Subject: Program to write first line of addresses
#
# Author: Ralph E. Griswold
#
# Date: November 19, 1997
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# 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, adlfiltr.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