[fpc-pascal] Pointer hashing

Lars noreply at z505.com
Mon Jan 30 05:50:01 CET 2017

On Sun, January 29, 2017 7:37 pm, Ryan Joseph wrote:
> I'm trying to hash a pointer value and found some example of hash
> function but not sure about translations and the process in general.

> x := (Power((x shr 16), x)) * $45d9f3b; x := Power((x shr 16), x);
result :=

The math unit, is something I've been meaning to try ... don't have much
experience with it.. but did you try the power operator?

It's **

  x := ((x shr 16) ** x) * $45d9f3b;

Above code please do not trust it, I have no experience with operator
overloading (or very little). I did not check to see what the function
does, is, etc.

More information about the fpc-pascal mailing list