JUSTONE -- a word sorter. 9 April 1984 ======================================= /* This routine removes duplicate words from a string, */ /* and illustrates the use of a compound variable */ /* which is indexed by arbitrary data (words). */ Justone: procedure /* make all variables private */ parse arg wordlist /* get the list of words */ hadword.=0 /* show all possible words as new */ outlist='' /* initialise output list */ do while wordlist<>'' /* loop while have data */ /* split WORDLIST into first word and remainder */ parse var wordlist word wordlist if hadword.word then iterate /* loop if had word */ hadword.word=1 /* record that we have had word */ outlist=outlist word /* add word to output list */ end return outlist /* finally return the result */