Command: splitid

Syntax

splitid <condition>

Description

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.

Parameters

Switches

Examples

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.

See Also

Commands:

reorder, reverse

Functions:

order