![]() |
PING
0.9
Statistical data handling and processing in production environment
|
Find all the occurrences of an element in a list and returns the indices of its position in that list.
list : a list of blank separated strings;item : a string defining the pattern/element to look for in input list;startind : (option) specifies the index of the item in list at which the search should start; incompatible with option startind above; default: startind, i.e. it is not considered;startpos : (option) specifies the position in list at which the search should start and the direction of the search (see argument of function find); default: startpos=1; incompatible with option startind above; default: startpos, i.e. it is not considered;casense : (option) boolean flag (yes/no) set to perform cases sensitive search/matching; default: casense=no, i.e. the upper-case pattern match will be searched/matched;sep : (option) character/string separator in input list; default: %quote( ), i.e. sep is blank.ind : output list of indexes, i.e. the positions of the element item in the list if it is found, and empty variable (i.e, ind=) otherwise.
Let us consider a simple example:
which returns ind=3 5 7, while:
only returns ind=5 7.
Run macro %_example_list_find for more examples.
%list_index, %list_slice, %list_count, %list_remove, %list_length, FIND, FINDW.