To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
The clear() method is used to set all the elements to NULL (in a static array) or remove all the elements (in a dynamic array). This method accepts no parameters.
The syntax of the method is as follows:
CALL ar.Clear()
or
array_variable.clear()
It is not identical to the usage of the INITIALIZE TO NULL statement, because the statement removes only the values leaving the array elements intact.
The clear() method can also be used with multi-dimensional dynamic arrays.
DEFINE ar DYNAMIC ARRAY OF CHAR(15)
...
FOR i = 1 TO 5 #the array has 5 elements
LET ar[i]="element "||i
END FOR
CALL ar.clear() #the array has no elements