Difference between revisions of "SortTIA"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure SortTIA(var TIA: TIntArray); </source> ==Availability== SCAR Divi 3.28 > Current ==Description== Sorts a given [[TIn...")
(No difference)

Revision as of 14:13, 23 October 2011

Definition

procedure SortTIA(var TIA: TIntArray);

Availability

SCAR Divi 3.28 > Current

Description

Sorts a given TIntArray TIA from the smallest to the largest integer using the fast ShellSort algorithm. An extended function with additional functionality is available as SortTIAEx.

Example

var
  TIA: TIntArray;

begin
  TIA := [5, 6, 1, 7, -20, 3, 2, 4, -1, 25];
  SortTIA(TIA);
  WriteLn(TIAToStr(TIA));
end.

Output:

-20,-1,1,2,3,4,5,6,7,25

See Also