Перегрузка операторов

type
  TPoint = record
    X, Y: Integer;
    constructor Create(AXAYInteger);
    class operator GreaterThan(
      const L, R: TPoint): Boolean;
    class operator LessThan(
      const L, R: TPoint): Boolean;
  end;

constructor TPoint.Create(AXAYInteger);
begin
  X := AX;
  Y := AY;
end;

class operator TPoint.GreaterThan(
  const L, R: TPoint): Boolean;
begin
  Result := (L.X > R.Xand (L.Y > R.Y);
end;

class operator TPoint.LessThan(
  const L, R: TPoint): Boolean;
begin
  Result := (L.X < R.Xand (L.Y < R.Y);
end;

var
  P1P2TPoint;
begin
  P1 := TPoint.Create(12);
  P2 := TPoint.Create(23);

  WriteLn('b1 is 'P1 > P2);
  //b1 is False

  WriteLn('b2 is 'P1 < P2);
  //b2 is True
end.