var lineintegerprocedure search (ttablevar aword)var idintegerhlongintfoundbooleanbegin (*compute hash index for auses global variable line* : : while [ do :( * ord( [ ])mod ninc(iendd : found :falserepeat if [hkey then (*match*found :truet[hlno[ [hn:lineif [hn noc then inc( [hnend elsif [hkey[ then (*new entry*found :truecopy(at[hkey) [hlno[ :linet[hn : else (*collision* : +dd : + if > then : - endif = then texts writestring( ,table overflow")halt( end end until found end searchprocedure tabulate (ttable)(*uses global writer *var ikintegerbegin for : to - do if [kkey[ then texts writestring(wt[kkey)texts write(wtab)for : to [kn - do texts writeint(wt[klno[ ] endtexts writeln(wend end end tabulateprocedure crossref (var rtexts reader)var iintegerchcharwwordhtablebegin new( )(*allocate and clear hash table*for : to - do [ikey[ :endline : texts writeint( )texts write(wtab)texts read(rch)while ~ eot do if ch dx then (*line end*texts writeln( )inc(line)texts writeint(wline )texts write( )texts read(rchelsif (" <ch(ch <" "or (" <ch(ch <" "then : repeat if wordlen- then [ :chinc(iendtexts write(wch)texts read(rchuntil ( wordlen- or ~((" <ch(ch <" ")~((" <ch(ch <" ")~((" <ch(ch <" "))