Getlastmodifiedarrayindex; Array Operations - Crestron SIMPL+ Reference Manual

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Crestron SIMPL+

Array Operations

Language Reference Guide - DOC. 5797G
®
Array Operations Overview
Array Operations functions are used to perform generalized operations on arrays,
such as getting bounds and setting the elements of an array to a known value in a
given SIMPL+ program.

GetLastModifiedArrayIndex

Name:
GetLastModifiedArrayIndex
Syntax:
INTEGER GetLastModifiedArrayIndex ();
Description:
Determines the specific index number of an input list array that has changed.
ANALOG_INPUT, BUFFER_INPUT, DIGITAL_INPUT, and STRING_INPUT
arrays are subject to be used in CHANGE, PUSH, and RELEASE statements, but
only the overall array can be specified in the statement, not an individual element. In
order to find out what element has been modified (and hence caused the activation of
the CHANGE, PUSH, or RELEASE), GETLASTMODIFIEDARRAYINDEX is
used.
NOTE: To use GETLASTMODIFIEDARRAYINDEX, only one array may be used
in a single CHANGE, PUSH, or RELEASE statement. If more than one element of
the array changes at the same time, multiple events are run. For example, if D[10] is
a DIGITAL_INPUT array that is subject to a PUSH event, and D[1] and D[2] change
at the same time, the PUSH is first run where D[1] changes and
GETLASTMODIFIEDARRAYINDEX returns 1, then the PUSH is run again where
D[2] changes and GETLASTMODIFIEDARRAYINDEX returns 2.
NOTE: Using GetLastModifiedArrayIndex OUTSIDE of an event (PUSH,
RELEASE, CHANGE or EVENT) may return an index to an ambiguous signal if
more than one input array is declared within the program. Therefore, do not use this
function if more than one input signal array is declared within the program, unless you
use it within one of the event statements.
Return Value:
The element of the array that has changed.
Software
®
SIMPL+
93

Advertisement

Table of Contents
loading

Table of Contents