Data.FmtBcd.TBcd
Delphi
TBcd = record
C++
struct DECLSPEC_DRECORD TBcd
{
public:
System::Byte Precision;
System::Byte SignSpecialPlaces;
System::StaticArray<System::Byte, 32> Fraction;
static TBcd __fastcall _op_Implicit(const System::UnicodeString str);
static TBcd __fastcall _op_Implicit(const double d);
static TBcd __fastcall _op_Implicit(const int I);
static TBcd __fastcall _op_Addition(const TBcd &A, const TBcd &B);
static TBcd __fastcall _op_Subtraction(const TBcd &A, const TBcd &B);
static TBcd __fastcall _op_Multiply(const TBcd &A, const TBcd &B);
static TBcd __fastcall _op_Division(const TBcd &A, const TBcd &B);
static TBcd __fastcall _op_UnaryNegation(const TBcd &A);
static bool __fastcall _op_Equality(const TBcd &A, const TBcd &B);
static bool __fastcall _op_Inequality(const TBcd &A, const TBcd &B);
static bool __fastcall _op_GreaterThan(const TBcd &A, const TBcd &B);
static bool __fastcall _op_LessThan(const TBcd &A, const TBcd &B);
static bool __fastcall _op_GreaterThanOrEqual(const TBcd &A, const TBcd &B);
static bool __fastcall _op_LessThanOrEqual(const TBcd &A, const TBcd &B);
TBcd& operator =(const System::UnicodeString str) { *this = TBcd::_op_Implicit(str); return *this; }
TBcd& operator =(const double d) { *this = TBcd::_op_Implicit(d); return *this; }
TBcd& operator =(const int I) { *this = TBcd::_op_Implicit(I); return *this; }
friend TBcd operator +(const TBcd &A, const TBcd &B) { return TBcd::_op_Addition(A, B); }
friend TBcd operator -(const TBcd &A, const TBcd &B) { return TBcd::_op_Subtraction(A, B); }
friend TBcd operator *(const TBcd &A, const TBcd &B) { return TBcd::_op_Multiply(A, B); }
friend TBcd operator /(const TBcd &A, const TBcd &B) { return TBcd::_op_Division(A, B); }
TBcd operator -() { return TBcd::_op_UnaryNegation(*this); }
friend bool operator ==(const TBcd &A, const TBcd &B) { return TBcd::_op_Equality(A, B); }
friend bool operator !=(const TBcd &A, const TBcd &B) { return TBcd::_op_Inequality(A, B); }
friend bool operator >(const TBcd &A, const TBcd &B) { return TBcd::_op_GreaterThan(A, B); }
friend bool operator <(const TBcd &A, const TBcd &B) { return TBcd::_op_LessThan(A, B); }
friend bool operator >=(const TBcd &A, const TBcd &B) { return TBcd::_op_GreaterThanOrEqual(A, B); }
friend bool operator <=(const TBcd &A, const TBcd &B) { return TBcd::_op_LessThanOrEqual(A, B); }
};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
record struct |
public | Data.FmtBcd.pas Data.FMTBcd.hpp |
Data.FmtBcd | Data.FmtBcd |
Description
TBcd stores a binary coded decimal value.
TBcd represents a binary-coded decimal value. It contains the following fields:
Field | Contents |
---|---|
Precision |
The number of digits in the decimal version of the value. |
SignSpecialPlaces |
|
Fraction |
An array of BCD nibbles, 00 to 99 per byte, high nibble first. Only the first Precision nibbles are used. |
You can create a Variant that represents a TBcd value using the Data.FmtBcd.VarFMTBcdCreate function. In fact, the easiest way to manipulate TBcd values is to create Variants for them and use the built-in operators provided by the Variant type.