RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomVariantType.BinaryOp Method

Implements any binary operations of which the custom System::Variant type is capable.

Pascal
procedure BinaryOp(var Left: TVarData; const Right: TVarData; const Operator: TVarOp); virtual;
C++
virtual __fastcall BinaryOp(TVarData Left, const TVarData Right, const TVarOp Operator);

Override BinaryOp to implement any binary operators the custom System::Variant type supports. 

Left is the value that appears to the left of the operator. BinaryOp changes this value to indicate the result of the operation. 

Right is the value that appears to the right of the operator. 

Operator identifies the operator that appears between Left and Right. It can be any of the following values:

Value 
Operation 
opAdd  
addition  
subtraction  
multiplication  
floating-point division  
integer division  
remainder  
bitwise left shift  
bitwise right shift  
opAnd  
bitwise and  
opOr  
bitwise or  
opXor  
bitwise exclusive or  

As implemented in TCustomVariantType, BinaryOp 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!