Single Value of an Array
- Last UpdatedMay 24, 2022
- 1 minute read
If assigning via a PML variable, an index number may be specified in square brackets.
!!CE.DESP[2] = 99
If assigning via the attribute name, a single value of an array may be set using the NUMB keyword. The NUMB keyword follows the attribute name, and is followed by the index number.
DESP NUMB 2 99
This sets the 2nd value of the array to 99.
The NUMB command actually specifies the start point for a list of values.
DESP NUM 3 99 100 101
This would set the 3rd value to 99, the 4th to 100 and the 5th to 101.
The new values may go off the end of the existing array, but the start point must not be more than one beyond the existing end point.
DESP 1 2 3 - set up initial values
DESP NUMB 4 99 - OK, as at end
DESP NUMB 6 100 - Error, as would leave a gap