RAD Studio VCL Reference
|
Implements comparisons that involve the custom System::Variant type.
procedure Compare(const Left: TVarData; const Right: TVarData; var Relationship: TVarCompareResult); virtual;
virtual __fastcall Compare(const TVarData Left, const TVarData Right, TVarCompareResult Relationship);
Override Compare to implement any comparison operators the custom System::Variant type supports. Descendants can implement comparison operators by overriding either the Compare or the CompareOp method.
Left is the value that appears to the left of the operator.
Right is the value that appears to the right of the operator.
Relationship returns a value indicating the relationship between Left and Right, as indicated in the following table:
Value |
Operation |
crLessThan |
Left is less than Right. |
crEqual |
Left is equal to Right. |
crGreaterThan |
Left is greater than Right. |
As implemented in TCustomVariantType, CompareOp raises a system error indicating an invalid operation.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|