File: diffwrds.icn

package info (click to toggle)
icon 9.5.25a-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,624 kB
  • sloc: ansic: 28,692; cpp: 5,650; yacc: 926; makefile: 882; lisp: 873; sh: 319; sed: 13; php: 1
file content (14 lines) | stat: -rw-r--r-- 332 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#
#          D I F F E R E N T   W O R D S
#

#  This program lists all the different words in the input text.
#  The definition of a "word" is naive.

procedure main()
   words := set()
   while text := read() do
      text ? while tab(upto(&letters)) do
         insert(words,tab(many(&letters)))
   every write(!sort(words))
end