Data.FmtBcd

From Appmethod Libraries
Jump to: navigation, search

Defines classes to support BCD (binary coded decimal) conversions, and a number of methods to support manipulation of BCD values.

Classes

EBcdExceptionEBcdException is the exception class for errors that occur when working with BCD values.
EBcdOverflowExceptionEBcdOverflowException is the exception class for errors that occur when a Variant can't create a BCD value due to the requested precision and number of decimals.

Routines

BcdAddAdds two TBcd values.
BcdCompareCompares two TBcd values.
BcdDivideDivides one BCD value by another.
BcdFromBytes
BcdMultiplyMultiplies two BCD values.
BcdPrecisionReturns the precision of a binary-coded decimal (BCD) value.
BCDRoundTo
BcdScaleReturns the number of decimal places for a binary-coded decimal (BCD) value.
BcdSubtractSubtracts one BCD value from another.
BcdToBytes
BCDToCurrConverts a binary-coded decimal value (BCD) to the corresponding Currency value.
BCDToCurrency
BcdToDoubleConverts a binary-coded decimal value (BCD) to the corresponding double precision floating point value.
BcdToInt64
BcdToIntegerConverts a binary-coded decimal value (BCD) to an integer.
BcdToStrReturns a string representation of a binary-coded decimal (BCD) value.
BcdToStrFReturns a string representation of a binary-coded decimal (BCD) value that reflects specified formatting.
CurrencyToBcd
CurrToBCDConverts a Currency value to the corresponding binary-coded decimal (BCD) value.
DoubleToBcdConverts a double precision floating point value to the corresponding binary-coded decimal (BCD) value.
FormatBcdReturns a string representation of a binary-coded decimal (BCD) value that reflects specified formatting.
IntegerToBcdConverts an integer value to the corresponding binary-coded decimal (BCD) value.
IsBcdNegativeIndicates whether a binary-coded decimal (BCD) value is less than 0.
NormalizeBcdConverts a BCD value into another BCD value with a specified precision and number of decimals.
RoundAt (deprecated)
StrToBcdConverts a string to the corresponding binary-coded decimal (BCD) value.
TryStrToBcdConverts a string to the corresponding binary-coded decimal (BCD) value.
VarFMTBcdReturns the TVarType constant that identifies the internal type of a Variant as a TBcd value.
VarFMTBcdCreateCreates a new Variant that stores its value internally as a TBcd value.
VarIsFMTBcdIndicates whether a specified Variant represents a TBcd value.
VarToBcdConverts a Variant into a TBcd type.

Types

PBcd
TBcdTBcd stores a binary coded decimal value.

Variables

BcdOverflowChecks
NullBcd

Represents a NULL TBcd value.

Constants

_DefaultDecimals_DefaultDecimals: Integer = $A;
_NoDecimal_NoDecimal: Integer = $FFFFFF01;
DefaultFMTBcdScaleDefaultFMTBcdScale: Integer = 6;
MaxBcdPrecisionMaxBcdPrecision: Integer = $12;
MaxBcdScaleMaxBcdScale: Integer = 4;
MaxFMTBcdDigitsMaxFMTBcdDigits: Integer = $20;
MaxFMTBcdFractionSizeMaxFMTBcdFractionSize: Integer = $40;
MaxStringDigitsMaxStringDigits: Integer = $64;
SizeOfFractionSizeOfFraction: Integer = $20;
SizeOfTBCDSizeOfTBCD: Integer = $22;