function sort
Returns an index list of X in ascending order.
Syntax
result = sort(X [, /reverse])
Arguments
X: | A matrix, a string or a string array. |
Switches
/reverse: | The index list will be in descending order |
Examples
To sort a directory listing in alphabetical order, type:
list = dir("/tmp"); list = list[sort(list)]