CONTAINS function
Synopsis
This function
searches an array for a value and returns true if an element with
an equivalent value is found.
Variations
CONTAINS(
SourceArray,
Value)
Returns true if the element is in
the array.
Details |
Examples |
Details and examples
Parameters
SourceArray
Specifies the array to work with.
Supported types: Boolean array; Numeric
array; String array; Point array; Object array.
Value
Specifies the value to search for.
Supported types: Boolean; Numeric; String;
Point; Object.
Returns
Examples
1. |
In the following example, the array contains an element with the
value 10, so the function returns true.
CONTAINS([0, 1,
2, 3, 4, 5, 6, 7, 8, 9, 10], 10)
|
2. |
In this example, the array does not contain an element with the
value 10, so the function returns false.
CONTAINS([0, 1,
2, 3, 4, 5], 10)
|