From RAD Studio API Documentation
Jump to: navigation, search


function CurrToBCD(const Curr: Currency; var BCD: TBcd; Precision: Integer = 32;
Decimals: Integer = 4): Boolean;


extern DELPHI_PACKAGE bool __fastcall CurrToBCD(const System::Currency Curr, TBcd &BCD, int Precision = 0x20, int Decimals = 0x4);


Type Visibility Source Unit Parent
function public
Data.FmtBcd Data.FmtBcd


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

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.

See Also