reorder <ident>,<order>
Re-order the elements of an array identifier.
<ident>
An existing identifier. This should be an array.
<order>
A numeric array whose values indicate the new element order for <ident>. This can be a numeric
array identifier or a list of numeric values within hairpins.
None
Some system identifiers are read-only and as such cannot be re-ordered.
If an array specification is appended to <ident>, then only the indicated array elements will be re-ordered.
There must not be more numeric values in <order> than there are elements in <ident>. Element indices must occur only once within <order>. If there are less numeric values in <order> than there are elements in <ident> then the <ident> array gets truncated to the lower size.
Re-order all elements of an identifier. After execution, xar values are 30,40,10,20.
numeric xar[] = <10,20,30,40> numeric ord[] = <3,4,1,2> reorder xar,ord
Reorder an array range. After execution ss values are 'A','C','E','B','D'.
string ss[] = <'A','B','C','D','E'> reorder ss[2:5],<2,4,1,3>
Commands: |