function CompNumber(const z1, z2: Variant): shortint;
begin
if z1 > z2 then Result := 1
else if z1 < z2 then Result := -1
else Result := 0
end;
// Beispielaufruf
procedure TForm1.Button13Click(Sender: TObject);
var
i: integer;
d: double;
begin
i := 100;
d := 100.0000000001;
case CompNumber(i, d) of
0: showmessage('i = d');
1: showmessage('i > d')
else showmessage('i < d')
end;
end;