Difference between revisions of "SortATIABySize"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> procedure SortATIABySize(var ATIA: T2DIntArray); </source> ==Availability== SCAR Divi 3.28 > Current ==Description== Sorts the...") |
(No difference)
|
Latest revision as of 14:25, 23 October 2011
Contents
Definition
procedure SortATIABySize(var ATIA: T2DIntArray);
Availability
SCAR Divi 3.28 > Current
Description
Sorts the TIntArrays in the given T2DIntArray ATIA by their respective lengths using the fast ShellSort algorithm.
Example
var ATIA: T2DIntArray; i: Integer; begin SetLength(ATIA, 3); ATIA[0] := [1, 5, 6, 7]; ATIA[1] := [2, 4]; ATIA[2] := [7, 8, 4, 5, 6]; SortATIABySize(ATIA); for i := 0 to High(ATIA) do WriteLn(TIAToStr(ATIA[i])); end.
Output:
2,4 1,5,6,7 7,8,4,5,6