RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
VarHlpr.VariantNeg Function

Inverts the sign of a Variant.

Pascal
function VariantNeg(const V1: Variant): Variant;
C++
Variant VariantNeg(const Variant V1);

VariantNeg will invert the sign of V1 from positive to negative and vice-versa.  

The input parameter must be convertible to a numerical type; otherwise an EVariantTypeCastError exception will be raised. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!