SortArray(ArrayName(), Options [, Start, End])
Sorts the specified array, according to the given options. The array may be of one of basic type: byte, word, long, integer, string or float. For structured array, use SortStructuredArray(). Multi-dimensioned arrays are not supported.


ArrayName() The array to sort.
Options It can be a combination of the following values:
  #PB_Sort_Ascending : Sort the array in ascending order (lower values first)
  #PB_Sort_Descending: Sort the array in descending order (higher values first)
  #PB_Sort_NoCase    : Sort the string array without case sensitive (a=A, b=B etc..)
Start, End (optional) The index of the first and last element in the array that should be sorted. If these parameters are not specified, then the whole array is sorted.

Return value



If an array is not fully filled then null elements will be sorted first in ascending order and last in descending order.

See Also

SortStructuredArray(), RandomizeArray()

Supported OS


<- RandomizeList() - Sort Index - SortList() ->