Rexx Programming/How to Rexx/array

From Wikibooks, open books for an open world
Jump to: navigation, search

The rexx scripting language supports associative containers.

What is an array?[edit]

An array is a variable containing several elements, and provides a convenient way of grouping a lot of values under a single variable name. An array is a bit like pigeon hole compartments with multiple storage places.

An array can hold multiple scalar values[edit]

An array contains sets of scalar values called elements. A variable that hold an array is called an array variable and can hold any number of elements and may be sparse or empty.

Arrays can be multidimensional[edit]

In rexx it is possible to use multidimensional arrays.

An array can be sparse[edit]

In rexx, an array can be sparse. This means that not every array position has to have a value or be initialized. There can be empty slots or positions within the array that do not contain data elements.