The system function ruiLib.sort() repeatedly
invokes a secondary sort function, first with array elements 1 and
2, then with elements 2 and 3, and so on. The invocations of the secondary
sort function continue and repeat, as necessary, until the array reflects
the requirement specified in that secondary function, which you develop.
Syntax
ruiLib.sort(array ANY[] in,sortFunction SortFunction)
- array
- An array to be sorted.
- sortFunction
- The secondary sort function, which you code.
Here is the structure
of that function:
Delegate
SortFunction(ValueA ANY in, valueB ANY in) returns (INT)
end
The secondary sort function returns a value
that indicates which of the two values is greater than the other.
If the first element is greater, the function returns -1; if the two
are identical, the function returns 0; if the second is greater, the
function returns 1.
A NullValueException is thrown if either argument
is null.