Understanding arrays

This is an introduction to arrays.

Arrays can store a one-, two- or three-dimensional set of elements.

The language supports three kind of array types:
  • Static arrays - introduced in early versions of the language.
  • Dynamic arrays - to be used in new developments.
  • Java arrays - to define a Java array, to interface with Java classes.

For static and dynamic arrays, elements can be of simple built-in types such as INTEGER, VARCHAR(n), RECORD structured types, or user-defined types. A BDL array can also be defined with built-in classes, imported module classes (from the Web Services extensions for example), or Java classes.

The first element in a BDL array is at position 1, for static, dynamic and Java arrays.

Arrays can be used to define a list of records that will be controlled by dialog instructions such as DISPLAY ARRAY and INPUT ARRAY.