Field-Map Scripting

4.5.2.8 SortAscending

SortAscending procedure


Prototype:

procedure SortAscending;

Description:

SortAscending procedure sorts values of the IntegerList by ascending

Syntax:

IntegerList.SortAscending;


Part

Description


IntegerList

A reference to an instance of a TIntegerListWrapper

Return value:

none



Example:


var

 intList : TIntegerListWrapper;

 v, i : integer;


begin

 intList := CreateIntegerList;


 intList.Add(2);

 intList.Add(4);   // it will be found

 intList.Add(8);

 intList.Add(4);


 intList.SortAscending;


for i:= 0 to (intList.Count - 1) do

begin

     ShowMessage(IntToStr(intList.Value[i]));

end;  



 intList.Free;

end.


IntegerList now contains values in this order 2,4,4,8.




See also:

Free; Add; Clear; Assign; Delete; Count; IndexOf; SortAscending; SortDescending; SortAscendingAndRemoveDuplicates; Value; Delimiter; DelimitedText; AsVarArray