Declaration
Automation:
void  ArithmeticOp ( [in]   IMultiSelection  pSelection, [in]   enum ArithmeticOpType  type, [in]   enum OperandSizeType  opsize, [in, optional]   Variant  Operand) ;
Native (C++):
HRESULT  ArithmeticOp ( [in]   IMultiSelection *  pSelection, [in]   enum ArithmeticOpType  type, [in]   enum OperandSizeType  opsize, [in, optional]   VARIANT  Operand) ;
Parameters
pSelection The multiple selection object which contains ranges for this operation to work on. type The operation to perform. Can be one of the following values:
Operation Type Value Description
ArithmeticOpNegation 0 Arithmetic negation (change sign): x[i] = - x[i];
ArithmeticOpAddition 1 Arithmetic addition: x[i] += operand;
ArithmeticOpSubrtaction 2 Arithmetic subtraction: x[i] -= operand;
ArithmeticOpMultiplication 3 Arithmetic multiplication: x[i] *= operand;
ArithmeticOpDivision 4 Arithmetic division: x[i] /= operand;
ArithmeticOpRemainder 5 Arithmetic division remainder: x[i] %= operand;
opsize Specifies the operand size. Can be one of the following values:
Operand Size Value Description
OperandSizeByte 0 8-bit integer (BYTE)
OperandSizeWord 1 16-bit integer (WORD)
OperandSizeDword 2 32-bit integer (DWORD)
OperandSizeQword 3 64-bit integer (QWORD)
Operand Second operand. Ignored for ArithmeticOpNegation operation type.
Return Value
S_OK or standard OLE error code.
Remarks
Performs an arithmetic operation on a given selection. Complexity: linear-time, depending on selection's complexity.