	function extract( var pq : tree ) : typekey;
	begin
	if pq=nil then Error {*** extraction from empty queue ***}
	else if pq^.right = nil then begin
		extract := pq^.k;
		pq := pq^.left
		end
	else	extract := extract( pq^.right )
	end;
