begin

integerfunction hash addr(string (31) name)
  constinteger hash table size = 1023
  integer hash index = 0; integer char
  for char = 1,1,LENGTH (name) cycle
    hash index =  hash index<<1 !! CHARNO(name,char)
  repeat
  result =  hash index & hash table size
end  {of  hash code generated from string}

endofprogram