Array Functions
Array
Description
Returns an array.
Syntax
- Array(arglist)
Arguments
- arglist
- A comma-delimited list of values that are assigned to the elements of an array contained with the Variant. If no arguments are specified, an array of zero length is created.
- The notation used to refer to an element of an array consists of the variable name followed by parentheses containing an index number indicating the desired element.
Filter
Description
Returns a zero-based array containing a subset of a string array based on a specified filter criteria.
Syntax
- Filter(inputstrings, value[, include[, compare]])
Arguments
- inputstrings
- One-dimensional array of strings to be searched.
- value
- String to search for.
- Include
- Optional. Boolean value indicating whether to return substrings that include or exclude Value.
- If Include is True, Filter returns the subset of the array that contains Value as a substring.
- If Include is False, Filter returns the subset of the array that does not contain Value as a substring.
- compare
- Optional. Numeric value indicating the kind of string comparison to use. The valid choices are:
Value |
Explanation |
---|---|
0 |
Binary comparison. |
1 |
Textual comparison. |
Join
Description
Returns a string created by joining a number of substrings contained in an array.
Syntax
- Join(list[, delimiter])
Arguments
- list
- A one-dimensional array containing substrings to be joined.
- delimiter
- Optional. String character used to separate the substrings in the returned string. If omitted, the space character (" ") is used. If delimiter is a zero-length string, all items in the list are concatenated with no delimiters.
LBound
Description
Returns the smallest available subscript for the indicated dimension of an array.
Syntax
- LBound(arrayname[, dimension])
Arguments
- arrayname
- The name of the array variable; follows standard variable naming conventions.
- dimension
- Optional. Whole number indicating which dimension's lower bound is returned. Use 1 for the first dimension, 2 for the second, and so on. If dimension is omitted, 1 is assumed.
Split
Description
Returns a zero-based, one-dimensional array containing a specified number of substrings.
Syntax
- Split(expression[, delimiter[, count[, compare]]])
Arguments
- expression
- A string expression containing substrings and delimiters.
- If expression is a zero-length string, Split returns an empty array, i.e. an array with no elements and no data.
- delimiter
- Optional. String used to identify substring limits. If omitted, the space character (" ") is assumed to be the delimiter. If delimiter is a zero-length string, a single-element array containing the entire expression string is returned.
- count
- Optional. Number of substrings to be returned; -1 indicates that all substrings are returned. If omitted, all substrings are returned.
- compare
- Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. The valid choices are:
Value |
Explanation |
---|---|
0 |
Binary comparison. |
1 |
Textual comparison. |
UBound
Description
Returns the largest available subscript for the indicated dimension of an array.
Syntax
- UBound(arrayname[, dimension])
Arguments
- arrayname
- The name of the array variable; follows standard variable naming conventions.
- dimension
- Optional. Whole number indicating which dimension's upper bound is returned. Use 1 for the first dimension, 2 for the second, and so on. If dimension is omitted, 1 is assumed.