DYNAMIC ARRAY.deleteElement

Removes an element from the array according to its index.

Syntax

deleteElement( index INTEGER )

Usage

This method removes the array element at the specified index.

No error is raised if the index is out of bounds.

Example

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