         Edinburgh IMP77 Compiler - Version 8.4

    1  %begin
    2  
    3  %integerfunction hash addr(%string (31) name)
    4    %constinteger hash table size = 1023
    5    %integer hash index = 0; %integer char
    6    %for char = 1,1,LENGTH (name) %cycle
    7      hash index =  hash index<<1 !! CHARNO(name,char)
    8    %repeat
    9    %result =  hash index & hash table size
   10  %end  {of  hash code generated from string}
   11  
   12  %endofprogram
?HASHADDR unused

   11 Statements compiled
