RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
VarCmplx.VarAsComplex Function

Casts an arbitrary Variant so that it is a custom Variant representing a complex number.

Pascal
function VarAsComplex(const AValue: Variant): Variant;
C++
Variant VarAsComplex(const Variant AValue);

VarAsComplex converts the Variant specified by AValue to a custom Variant representing the corresponding complex number. It returns the custom Variant

If VarAsComplex can't perform the conversion, it raises an EInvalidCast exception. 

Complex Variants are custom Variants that represent complex numbers. The Variant type supports direct manipulation using the addition, subtraction, multiplication, division (but not integer division), and negation operators. They have 5 published properties: Real, Imaginary, Radius, Theta, and FixedTheta. They can be cast to and from integer types, floating point types, string types, TDateTime values, and boolean values. In addition, the VarCmplx unit implements a number of global functions for operating on complex Variants

 

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