Dynamic array methods

These methods are used to manipulate variables of a DYNAMIC ARRAY data type (e.g., to add and remove array elements).  

Most methods described here can be applied only to one-dimensional dynamic arrays (only few of them can also be used with multi-dimensional arrays).

Dynamic arrays are resized automatically when elements are assigned values and their size corresponds to the largest element index.

Dynamic array methods  are invoked in this way:

DEFINE ar DYNAMIC ARRAY OF CHAR(15)

CALL ar.<Method>(<parameters>)

Some methods have two variants. They differ in the method name and/or its parameters.

Available methods

append()

adds a new element after the last element of the array

appendElement()

adds a new element with the NULL value to the array (takes no parameters)

clear()

removes all the elements

delete()

removes all the specified array elements within the given range or at the given position

deleteElement()

removes the specified array element

getSize() / getLength()

returns the size (length) of a single-dimensional array

getValues()

flattens the array

insert()

inserts a new array element to the specified position (the value of a new element is passed as one of the method parameters)

insertElement()

inserts an empty array element to the specified position

join()

concatenates all the elements of an array into a string

resize()

resizes the single-dimensional array to the specified size

 

Contact Us

Privacy Policy

Copyright © 2026 Querix, (UK) Ltd.