title: Sort issues with TArray<Myrectype> for large numbers
body: <p>What is the reason why <code>TArray.Sort&lt;Mytype&gt;</code> does not work when I have large numbers in the comparison?</p>
  
  <p>My code is as follows (Delphiy Tokyo):</p>
  
  <pre><code>Interface
  
  Type 
   RCInd = record
             Num              : Integer;
             Ger              : Integer;           
             Confirmed        : Boolean;
             Total            : Real;
     End;
  
     TArrInd = TArray&lt;RCInd&gt;;
  
     Procedure SortInd  (Var PArrayInd  : TArrInd);
  
  Implementation  
  
  Procedure SortInd  (Var PArrayInd  : TArrInd);    
  begin
    TArray.Sort&lt;RCInd&gt;( PArrayInd,TComparer&lt;RCInd&gt;.Construct
                         ( function (Const Rec1, Rec2 : RCInd) : Integer 
                           begin
                             Result := - ( Trunc(Rec1.Total) - Trunc(Rec2.Total) );
                           end )
                         );
  end;
  
  ......
  </code></pre>
  
  <p>When the values of Rec1.Total  and Rec2.Total are within a Integer limits, this Sort works fine, BUT when values exceed Integer limits Sort procedure does not work!   It generates a non sorted set of data in PArrayInd .</p>
  
  <p>What is going on here?</p>