Arrays - IBM 5110 User Manual

Apl
Table of Contents

Advertisement

16
ARRAYS
Array is the general term for a collection of data, and includes scalars
(single data items), vectors (strings of data)' matrices (tables of data),
and arrays of higher dimensions (multiple tables). All primitive (built-in)
functions are designed to handle arrays. Some functions are designed
specifically to handle arrays rather than scalars. Indexing, for example,
can select certain elements from an array for processing.
One of the simplest kinds of arrays, the vector, has only one
dimension; it can be thought of as a collection of elements arranged
along a horizontal line. The numbers that indicate the positions of
elements in an array are called indices. An element can be selected
from a vector by a single index because a vector has only one
dimension. The following example shows assigning a numeric and a
character vector to two variable names, Nand C; the names are then
entered to display the values they represent:
N~5
6.2 -3 888 95.12
N
5 6.2 -3 888 95.12
C~··'
ABCDEFG'
C
ABCDEFG

Advertisement

Table of Contents
loading

Table of Contents