RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
FMTBcd.BcdDivide Function

Divides one BCD value by another.

Pascal
procedure BcdDivide(Dividend: string; Divisor: string; var bcdOut: TBcd); overload;
procedure BcdDivide(const Dividend: TBcd; const Divisor: TBcd; var bcdOut: TBcd); overload;
procedure BcdDivide(const Dividend: TBcd; const Divisor: Double; var bcdOut: TBcd); overload;
procedure BcdDivide(const Dividend: TBcd; const Divisor: string; var bcdOut: TBcd); overload;
C++
BcdDivide(AnsiString Dividend, AnsiString Divisor, TBcd bcdOut);
BcdDivide(const TBcd Dividend, const TBcd Divisor, TBcd bcdOut);
BcdDivide(const TBcd Dividend, const Double Divisor, TBcd bcdOut);
BcdDivide(const TBcd Dividend, const AnsiString Divisor, TBcd bcdOut);

BcdDivide divides Dividend by Divisor and returns the result as bcdOut. 

The return value is given a precision and number of decimal places that is sufficient to accurately represent the result of the division, if possible. (The number of decimal places in the result, however, will never exceed 10.) You can convert this to a specific precision and number of decimal places using the NormalizeBcd procedure. 

 

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