# -*- mode: icon -*- # $Id: spellcheck.icon,v 1.1 2001/01/28 03:20:33 doug Exp $ # http://www.bagley.org/~doug/shootout/ procedure main(argv) local dict n := argv[1] | 1 dict := table(0) f := open("Usr.Dict.Words") | { write(&errout, "Can't open \"Usr.Dict.Words\"") fail } while line := read(f) do line ? { dict[line] := 1 } close(f) while line := read() do line ? { if (not member(dict,line)) then { write(line) } } end