function p1(a, b: T): integer; where T: System.IComparable; begin Result := a.CompareTo(b); end; function p2(a, b: T): integer; where T: record, System.IComparable; begin Result := a.CompareTo(b); end; begin assert(p1(2,1) = 1); assert(p2(2,1) = 1); end.