|
PROCEDURE Lookup(tree: Tree; key: Objects.Object; VAR object: Objects.Object) : BOOLEAN; (* precondition: key must be comparable for tree; stores into object that object of the tree that is identical to key if present; returns TRUE if one object has been found *) VAR parent, node: Node; BEGIN ASSERT(tree.comparable(key)); IF Find(tree, key, parent, node) THEN object := node.object; RETURN TRUE ELSE RETURN FALSE END; END Lookup; |
Copyright © 1999, 2004 Andreas F. Borchert, in HTML konvertiert am 28.01.2005 |