Remove - method of object PmArray

Removing one or multiple items from the array. The size of the array is reduced by removed items.
Empty Remove(Long nPos, [Long nCount])
PmArray.Remove(nPos, nCount)
nPos(Long) The index of an item to be removed. The value -2 means poslední položku.
nCount[optional] (Long) The number of items to be removed. The items are being removed from defined position towards the end of the array. If the last position of the array is set (-2) then the items are being removed from the end of the array towards the beginning. Either all selected items are removed or the method fails.
This method is also functional for Web panels.
Removing 2 items from array a (0, 10, 20, 30, 40) from position 2 and from position -2 (from the end).
JavaScriptSelect and copy to clipboard

var a = Pm.CreatePmArray().Array1(0, 10, 20, 30, 40);
a.Remove(2, 2);  //The result will be (0, 10, 40)
a.Remove(-2, 2);  //The result will be (0, 10, 20)

Pm9.00.04: Created
PROMOTIC 9.0.4 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice