mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-24 09:39:11 +02:00
* correctly compare tkFloat values
git-svn-id: trunk@40661 -
This commit is contained in:
parent
8d235b5f26
commit
bd328025fd
@ -138,6 +138,21 @@ begin
|
||||
Result := aValue1.AsOrdinal = aValue2.AsOrdinal;
|
||||
tkQWord:
|
||||
Result := aValue1.AsUInt64 = aValue2.AsUInt64;
|
||||
tkFloat:
|
||||
if td1^.FloatType <> td2^.FloatType then
|
||||
Result := False
|
||||
else begin
|
||||
case td1^.FloatType of
|
||||
ftSingle,
|
||||
ftDouble,
|
||||
ftExtended:
|
||||
Result := aValue1.AsExtended = aValue2.AsExtended;
|
||||
ftComp:
|
||||
Result := aValue1.AsInt64 = aValue2.AsInt64;
|
||||
ftCurr:
|
||||
Result := aValue1.AsCurrency = aValue2.AsCurrency;
|
||||
end;
|
||||
end;
|
||||
tkSString,
|
||||
tkUString,
|
||||
tkAString,
|
||||
|
Loading…
Reference in New Issue
Block a user