WatchArray
(Engine-Level Function)
Description: | Watches an array and returns true if any of its elements' types or values change. |
Returns: | Boolean |
Usage: | Steady State only. |
Function Groups: | Array, Variable |
Related to: | Change | Edge | Watch |
Format: | WatchArray(Start, ArrayElem, NumElem) |
Parameters: |
Start |
Required. Any expression which evaluates to a false (0) or true (non-0) value. This will be the initial return value of the function. |
ArrayElem |
Required. Any numeric array element giving the starting element of the group of elements to watch. The subscript for the array may be any numeric expression. If processing a multidimensional array, the usual rules apply to decide which dimension should be examined. |
NumElem |
Required. Any numeric expression giving the number of array elements to watch. If NumElem extends past the upper bound of the lowest array dimension, this computation will "wrap-around" and resume at element 0, until N elements have been located. |
Comments: | This is a resettable function whose initial return value will be set by the first parameter. This parameter is ignored after the initial evaluation of the function. |
Example:
If WatchArray(0, dataArray[0], 10); [ ...; ]
This script will be executed if any of the elements from 0 to 9 inclusive experience a change by any amount, if they become invalid, or if their type changes.