Application icon

List Manipulate

This statement performs a function on an entire list to produce a new list. The lists used by the statement are stored in named variables. The operation can be performed case insensitive. All the functions ignore empty list elements.

Text fields may contain any of the escape sequences described in Escape Sequences.

All delimiter fields are defaulted to \~ if omitted.

The following functions are available:

Union
The two source lists are merged such that the resultant list contains a single instance of all items in either of the source lists.

Intersection
The two source lists are merged such that the resultant list contains a single instance of all items which are in both of the source lists.

Remove
Two lists are merged such that the resultant list contains a single instance of all items in the first source list which are not in the second source list.

Set
The results list contains a single instance of each unique item in the first source list. This function is equivalent to re-building the list with the Build List statement.

Numeric
The results list contains a single instance of every item in the source set treated as an integer value. Note that 2, 2.1 and 2 times will result in a single value of 2. The default

Filter
The results list contains only those items which match the specified filter test and filter data. The Case Insensitive option is ignored unless a Text test is chosen. The Match Words option is ignored unless a Starts With, Ends With or Contains test is chosen. For the purposes of this function a match whole word test fails if:
the first character in the from pattern is alphanumeric and the character preceding the match is alphanumeric.
   or if:
the last character in the from pattern is alphanumeric and the character following the match is alphanumeric.
key-value
A key-value list is constructed where the first source list provides the keys and the second source list provides the values. If there are more items in the first list than the second, empty values will be provided. If there are more items in the second list than the first, they will be ignored. The default key value separator, \k, is always used.

Common Prefix
The longest common prefix in the first source list is returned. The result is always a list of at most one item. Leading spaces in list components are significant.

Trim Spaces
Each element in the first source list will have leading and trailing whitespace removed.

With the exception of Filter, the results list is not sorted in any particular order. If you want the list to be sorted use a Sort List statement. When Filter is selected, the initial order is preserved.