PML Customisation
User Guide
Arrays
:
Array Methods
: Appending a New Element to an Existing Array
Appending a New Element to an Existing Array
To set a new element at the end of an existing array without needing to know which elements are already set, use the
Append()
method thus:
!Result.Append(!NewValue)
The new array element to be created is determined automatically by adding 1 to the highest existing index for the array
!Result
. The data are stored in
!Result[1]
if the array does not yet contain any elements.
The array
!Result
must exist before
you
can call this method. If necessary
you
can create an empty array (with no elements) beforehand:
!Result = ARRAY()
If
!Result
exists already as a simple variable,
you
will get an error and the command is ignored.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.