FMTBcd.NormalizeBcd

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From FMTBcd.pas

	function NormalizeBcd(const InBcd: TBcd;
		var OutBcd: TBcd;
		const Prec: Word;
		const Scale: Word): Boolean;


Unit: FMTBcd

Type: function

Visibility: public

C++ Information

From FMTBcd.hpp

	bool __fastcall NormalizeBcd(const Fmtbcd::TBcd & InBcd,
		Fmtbcd::TBcd & OutBcd,
		unsigned short Prec,
		unsigned short Scale);


Unit: FMTBcd

Type: function

Description

Converts a BCD value into another BCD value with a specified precision and number of decimals.


Call NormalizeBcd to give a TBcd value a specific precision and number of decimal places. If the specified precision or number of decimal places is less than that of the original BCD value, NormalizeBcd truncates the value (as opposed to rounding).

InBcd is the BCD value to convert.

OutBcd returns the resulting BCD value with the specified precision and decimal places.

Prec is the number of significant digits in OutBcd.

Scale is the number of decimal places in OutBcd.

NormalizeBcd returns true if the conversion can be made with no loss of precision. It returns false if the conversion required some digits to be truncated.

See Also

Personal tools
Translations
Newest Version