| Int2Placing Routines | 
Unit
QESBPCSConvert
| Overloaded Variants | 
| Function Int2Placing(L: LongInt): string; | 
| Function Int2Placing(L: Int64): string; | 
Declaration
Function Int2Placing(L: LongInt): string;
| Parameters | 
| L | Value to process | 
Category
String/Integer Conversion RoutinesImplementation
 
| function Int2Placing (L: LongInt): string;
begin
     case abs (L) mod 10 of
          1: Result := 'st';
          2: Result := 'nd';
          3: Result := 'rd';
     else
          Result := 'th';
     end;
     case abs (L) mod 100 of
          11, 12, 13: Result := 'th';
     end;
End; | 
Declaration
Function Int2Placing(L: Int64): string;Implementation
 
| function Int2Placing (L: Int64): string;
begin
     case L mod 10 of
          1: Result := 'st';
          2: Result := 'nd';
          3: Result := 'rd';
     else
          Result := 'th';
     end;
     case L mod 100 of
          11, 12, 13: Result := 'th';
     end;
End; | 
|  |