* here is a 31 bit hash function, remember that hashes are not quaranteed to be * unique FUNCTION hash (tcString) LOCAL i, lnHash, lcString lnHash = 0 lcString = tcString + REPLICATE(CHR(0), 4) FOR i = 1 TO LEN(tcString) STEP 4 lnHash = BITCLEAR(BITXOR(lnHash, CTOBIN(SUBSTR(lcString, i, 4))), 31) ENDFOR RETURN lnHash