Difference between revisions of "SortTIA"
From SCAR Divi Manual
(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...") |
|||
Line 32: | Line 32: | ||
[[Category:TIA Functions]] | [[Category:TIA Functions]] | ||
[[Category:Array Functions]] | [[Category:Array Functions]] | ||
+ | [[Category:Math Functions]] |
Latest revision as of 20:25, 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