Implementierung assoziativer Arrays VII

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]

Hashes.om
PROCEDURE Lookup(hash: Hash; key: Objects.Object;
                 VAR object: Objects.Object) : BOOLEAN;
   (* precondition: key must be hashable for hash;
      stores into object that object of the hash
         that is identical to key if present;
      returns TRUE if one object has been found
   *)
   VAR
      hashval: HashValue;
      entry, predecessor: Entry;
BEGIN
   IF Find(hash, key, hashval, entry, predecessor) THEN
      object := entry.object;
      RETURN TRUE
   ELSE
      RETURN FALSE
   END;
END Lookup;

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]
Copyright © 1999 Andreas Borchert, in HTML konvertiert am 29.06.1999