mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 06:23:02 +02:00
* BCD-Variant support is now implemented, use it.
git-svn-id: trunk@16980 -
This commit is contained in:
parent
979fd9b854
commit
a3ebc51add
@ -2444,8 +2444,7 @@ function TFMTBCDField.GetAsVariant: Variant;
|
||||
var bcd: TBCD;
|
||||
begin
|
||||
If GetData(@bcd) then
|
||||
Result := BCDToDouble(bcd)//remove when complete variant support in fmtbcd.pp will be implemented
|
||||
//Result := VarFMTBcdCreate(bcd) //later invalid variant type cast ?
|
||||
Result := VarFMTBcdCreate(bcd)
|
||||
else
|
||||
Result := Null;
|
||||
end;
|
||||
@ -2546,11 +2545,8 @@ begin
|
||||
end;
|
||||
|
||||
procedure TFMTBCDField.SetVarValue(const AValue: Variant);
|
||||
var E:double;
|
||||
begin
|
||||
E:=AValue;
|
||||
SetAsBCD(DoubleToBCD(E));//remove when VarToBCD in fmtbcd.pp will be implemented
|
||||
//SetAsBCD(VarToBCD(AValue));
|
||||
SetAsBCD(VarToBCD(AValue));
|
||||
end;
|
||||
|
||||
procedure TFMTBCDField.SetAsFloat(AValue: Double);
|
||||
|
Loading…
Reference in New Issue
Block a user