DYNAMIC ARRAY as class / DYNAMIC ARRAY methods |
Removes an element from the array according to its index.
deleteElement( index INTEGER )
This method removes the array element at the specified index.
No error is raised if the index is out of bounds.
MAIN DEFINE a DYNAMIC ARRAY OF INTEGER LET a[10] = 9 CALL a.deleteElement(5) DISPLAY a.getLength() -- shows 9 DISPLAY a[9] -- shows 9 END MAIN