RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
FMTBcd.CurrToBCD Function

Converts a Currency value to the corresponding binary-coded decimal (BCD) value.

Pascal
function CurrToBCD(const Curr: Currency; var BCD: TBcd; Precision: Integer = 32; Decimals: Integer = 4): Boolean;
C++
Boolean CurrToBCD(const Currency Curr, TBcd BCD, int Precision = 32, int Decimals = 4);

Use CurrToBCD to convert a Currency value, such as is used by TBCDField objects, into a binary-coded decimal value, such as is stored in a physical BCD database field. CurrToBCD returns true if the Currency object passed as the Curr parameter is successfully converted into a BCD value and passed out as the BCD parameter. The Precision parameter specifies the number of digits represented in the BCD value, and the Decimals parameter specifies the number of those digits that are after the decimal point. 

 

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