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
/
diffword.icn
< prev
next >
Wrap
Text File
|
2000-07-29
|
822b
|
32 lines
############################################################################
#
# File: diffword.icn
#
# Subject: Program to list different words
#
# Author: Ralph E. Griswold
#
# Date: May 9, 1989
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program lists all the different words in the input text.
# The definition of a "word" is naive.
#
############################################################################
procedure main()
local letter, words, text
letter := &letters
words := set()
while text := read() do
text ? while tab(upto(letter)) do
insert(words,tab(many(letter)))
every write(!sort(words))
end