RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
FMTBcd.VarFMTBcdCreate Function

Creates a new Variant that stores its value internally as a TBcd value.

Pascal
procedure VarFMTBcdCreate(var ADest: Variant; const ABcd: TBcd); overload;
function VarFMTBcdCreate: Variant; overload;
function VarFMTBcdCreate(const AValue: string; Precision: Word; Scale: Word): Variant; overload;
function VarFMTBcdCreate(const AValue: Double; Precision: Word = 18; Scale: Word = 4): Variant; overload;
function VarFMTBcdCreate(const ABcd: TBcd): Variant; overload;
C++
VarFMTBcdCreate(Variant ADest, const TBcd ABcd);
Variant VarFMTBcdCreate();
Variant VarFMTBcdCreate(const AnsiString AValue, Word Precision, Word Scale);
Variant VarFMTBcdCreate(const Double AValue, Word Precision = 18, Word Scale = 4);
Variant VarFMTBcdCreate(const TBcd ABcd);

Call VarBcdCreate to obtain a Variant that stores its value as a TBcd value. 

Using the first syntax, the Variant returned as aDest has the same value as ABcd. 

Using the second syntax (passing no arguments), the returned Variant has a value of NullBcd

Using the third syntax, the returned Variant has the same value as ABcd. 

Using the fourth syntax, the returned Variant converts AValue (if necessary) to extract the value.  

Using the remaining syntaxes, the AValue parameter is converted into a TBcd value with the specified Precision and Scale and the result is the value of the Variant

 

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