ハッシュ関数書いたよー
とりあえず文字列を受け取ってハッシュ値を返す関数ね

function hash(s)
dim l, h

l = len(s)
h = 0

for i = 1 to l
h = h + asc(mid(s, i, 1))
next

hash = h mod 997
end function