function search( key : typekey; var r : dataarray ) : integer;
var i, inc : integer;
begin
i := hashfunction( key ) ;
inc := 0;
while (inckey) do
begin
i := (i+inc+1) mod m;
inc := inc + 2
end;
if r[i].k=key then search := i {*** found(r[i]) ***}
else search := -1; {*** notfound(key) ***}
end;
|