|
@@ -1127,19 +1127,7 @@ end;
|
|
{$ifndef FPUNONE}
|
|
{$ifndef FPUNONE}
|
|
function DoVarCmpFloat(const Left, Right: Double; const OpCode: TVarOp): ShortInt;
|
|
function DoVarCmpFloat(const Left, Right: Double; const OpCode: TVarOp): ShortInt;
|
|
begin
|
|
begin
|
|
- if SameValue(Left, Right) then
|
|
|
|
- Result := 0
|
|
|
|
- else if (OpCode in [opCmpEq, opCmpNe]) or (Left < Right) then
|
|
|
|
- Result := -1
|
|
|
|
- else
|
|
|
|
- Result := 1;
|
|
|
|
-end;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-function DoVarCmpDate(const Left, Right: TDateTime; const OpCode: TVarOp): ShortInt;
|
|
|
|
-begin
|
|
|
|
- { dates have to match exactly, all bits encode time information }
|
|
|
|
- if(Left = Right) then
|
|
|
|
|
|
+ if Left = Right then
|
|
Result := 0
|
|
Result := 0
|
|
else if (OpCode in [opCmpEq, opCmpNe]) or (Left < Right) then
|
|
else if (OpCode in [opCmpEq, opCmpNe]) or (Left < Right) then
|
|
Result := -1
|
|
Result := -1
|
|
@@ -1275,7 +1263,7 @@ begin
|
|
else
|
|
else
|
|
Result := DoVarCmpWStr(vl, vr, OpCode);
|
|
Result := DoVarCmpWStr(vl, vr, OpCode);
|
|
{$ifndef FPUNONE}
|
|
{$ifndef FPUNONE}
|
|
- ctDate: Result := DoVarCmpDate(VariantToDate(vl), VariantToDate(vr), OpCode);
|
|
|
|
|
|
+ ctDate: Result := DoVarCmpFloat(VariantToDate(vl), VariantToDate(vr), OpCode);
|
|
ctCurrency: Result := DoVarCmpCurr(VariantToCurrency(vl), VariantToCurrency(vr));
|
|
ctCurrency: Result := DoVarCmpCurr(VariantToCurrency(vl), VariantToCurrency(vr));
|
|
{$endif}
|
|
{$endif}
|
|
ctString:
|
|
ctString:
|