2. Language Elements : Variables : Dynamic Array Variables
 
Share this page                  
Dynamic Array Variables
A dynamic array variable is a named set of rows. All the rows in the array are reference variables that point to objects of a given class (or any of its subclasses).
Rows in an array are numbered. Because you can add to or subtract rows from an array and the array automatically adjusts as you do so, the array is said to be dynamic.
Some arrays have rows with non-positive numbers. These are rows that are marked “deleted.” Deleted rows are not visible when the array is displayed in a table field, but they are not yet actually removed from the array.
Each array is associated with an array object, that is, an object of the class ArrayObject. The methods that you can use to manipulate arrays are defined for this class as described in ArrayObject Class (see ArrayObject Class).
The following subsections describe how to declare a dynamic array and briefly discuss referencing arrays in your 4GL code. For more information about referencing array components, manipulating arrays, and the relationship between arrays and table fields, see "Working with Arrays, Table Fields, and Collections" in the Programming Guide.