# Sort

`SUB Sort ( [ Mode AS Integer ] )`

Sorts the array.

The Mode argument is a combination of the following constants:

- gb.Ascent to specify an ascending sort. This is the default.
- gb.Descent to specify a descending sort.
- gb.Binary to specify a binary comparison. This is the default.
- gb.Text to specify a case insensitive comparison.
- gb.Lang to specify a locale aware comparison based on the system charset.