Sign in Join
FPDoc Onlineexperiment

TAVLTree.Compare function

Member of TAVLTreepublicIn unit AVL_Tree

Compare 2 nodes.

Declaration

pascal
function Compare(Data1: Pointer; Data2: Pointer): Integer

Arguments

Data1

First data pointer.

Data2

Second data pointer.

Function result

Result of the comparison.

Description

Compare compares the keys from 2 data pointers. It uses the appropriate compare function OnCompare or OnObjectCompare to do so. The result is

  • negative if the first key comes before the second
  • 0 when the two keys are equal.
  • positive if the second key comes before the first

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.