XArrayDB Reference > XArrayDB Object Methods > Delete Method (XArrayDB) |
Delete Method (XArrayDB)
This method deletes the element at position index from the dimension specified by nDim while preserving data and shifting the indexes of the remaining elements appropriately.
XArrayDB.Delete nDim, index
Arguments
nDim is a one-based integer specifying an array dimension.
index is a long integer specifying an element position within the dimension nDim.
Return Value
None
Method applies to XArrayDB object.
The nDim argument should be 1 for rows and 2 for columns. A trappable error occurs if an invalid dimension is specified.
Note: This method is provided for backward compatibility with the XArray object. Both of the following statements delete the row whose index is n.
MyArray.Delete 1, n
MyArray.DeleteRows n
Similarly, both of the following statements delete the column whose index is n:
MyArray.Delete 2, n
MyArray.DeleteColumns n
Unlike Delete, the DeleteRows and DeleteColumns methods support the deletion of multiple contiguous elements.
See Also