splitid <condition>
Analyse the contents of an identifier array according to the value of a conditional expression evaluated for every element of the array.
The contents of the array are left unchanged by this command, but 1 or 2 numeric arrays are created with details of which array elements did and/or did not satisfy the condition.
<condition>
A conditional expression containing an array and a boolean expression to be evaluated for every element
of the array. This array may only be of type string,
numeric, time, window,
channel or layer.
-on0=<ident>
Record the indices of all array elements which do not satisfy the condition. If <ident>
does not exist it will be created using current scope rules.
-on1=<ident>
Record the indices of all array elements which do satisfy the condition. If <ident>
does not exist it will be created using current scope rules.
Create 2 new arrays from the values of a numeric array.
numeric xar[] = <1,10,12,37,15,4,91> splitid xar > 10,-on0=le10,-on1=gt10 numeric new1[] = xar[le10] numeric new2[] = xar[gt10]
The result will be a new array new1 of length 3 with values 1,10,4, and a new array new2 of length 4, with values 12,37,15,91.
Commands: |
|
Functions: |