Home Segments Index Top Previous Next

375: Mainline

A one-dimensional array is a collection of objects in which the objects are stored and retrieved via an integer index. Each object in an array is called an element of that array. In Smalltalk, the first element is indexed by 1; hence, Smalltalk is said to have 1-based arrays.

The following, for example, is a diagram of a one-dimensional array with integer elements:

   1       2      3      4      <-- Index 
*------*------*------*------* 
|  570 |  720 |  640 |  720 | 
*------*------*------*------*