sortid <ident>
Sort the contents of an identifier array.
<ident>
The name of the array to be sorted. This should be an array of type string,
numeric, time, window,
channel or layer.
-d
Sort in descending order. The default is ascending order.
-dup
Allow duplicate entries during the sort. This is the default behavior.
Use the switch -no_dup to eliminate duplicate
entries.
-n
For string sorts, evaluate numbers within values before sorting. Without
this switch "test12" precedes "test4" because "1"
is lexically less than "4". With this switch "test4"
precedes "test12" because 4 is numerically less than 12.
-on=<ident>
Record the sort order in a numeric array. If <ident>
does not exist it will be created using current scope rules.
-u
For string sorts, treat upper and lower case characters as different. The
default behavior is to ignore case differences.
-upd
Update the array parameter with the result of the sort. This is the default behavior.
Use the switches -no_upd and -on to compute
the sort order without changing the original array.
-z
Eliminate null values from the result. The default behavior is to allow
null values. A null string is an empty string. A null numeric is the value
0.
Sort a string array ss in ascending order.
string ss[] = <'Albania','Detroit','Chard','Botulism'> sortid ss
Sort a string array ss into descending order, removing empty elements. A numeric array ord will be created and will contain the values: 2,4,5,1.
string ss[] = <'A', 'D', '', 'C', 'B'> sortid ss,-d,-z,-on=ord
Commands: |
|
Functions: |