RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomVariantType.BinaryOp Method

Implements any binary operations of which the custom 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 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  
opSubtract  
subtraction  
opMultiply  
multiplication  
opDivide  
floating-point division  
opIntDivide  
integer division  
opModulus  
remainder  
opShiftLeft  
bitwise left shift  
opShiftRight  
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) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!