DYNAMIC ARRAY.clear

Removes all elements of the array.

Syntax

clear()

Usage

This method clears the array, by removing all its elements.

Use the clear() method just before filling the array with a new set of elements, if the array is potentially not empty.

Example

FUNCTION fill_array(arr)
    DEFINE arr DYNAMIC ARRAY OF STRING
    DEFINE i INTEGER
    CALL arr.clear()
    FOR i=1 TO 10
       LET arr[i] = "Item #"||i
    END FOR
END FUNCTION