(Contents)(Previous)(Next)

The Statements LTSORT and GTSORT

Vectors can be sorted with the statements GTSORT (in ascending order) and LTSORT (in descending order). The first vector slice specified is sorted accordingly. The other vectors are swapped component for component.

When all the components can be represented as numbers, the sorting is done in numeric order (e.g. 2 < 10). As soon as only one component cannot be represented as a number and is not the NULL value either, all components are treated as strings and sorted accordingly (e.g. 10 < 2). NULL values are regarded as the largest possible value, i.e. for LTSORT they are put at the beginning of the vector slice to be sorted and for GTSORT they are put at the end.

Syntax:


(Contents)(Previous)(Next)