content_image/714203.jpg
<img src='content_image/714203.jpg'>

An option available to each of the structuring methods is an indication of the preferred internal data representation. A structured type definition prefixed with the symbol packed signals the compiler to economize storage requirements, even at the expense of additional execution time and a possible expansion of the code, due to the necessary packing and unpacking operations. It is your responsibility to realize if you want this trade of execution efficiency for space. (The actual effects upon efficiency and savings in storage space are implementation dependent, and may, in fact, be zero.) 

## 6.A. The Array Type 

An array type consists of a fixed number of components (defined when the array type is introduced) all having the same type, called the component type. Each component can be explicitly denoted and directly accessed by the name of the array variable followed by the so-called index in square brackets. Indices are computable; their type is called the index type. Furthermore, the time required to select (access) a component does not depend upon the value of the selector (index); hence the array is termed a random-access structure. 

The definition of a new array type specifies both the component type and the index type. The general form is: 

type A = array [TIl of T2; 

where A is a new type identifier; T 1 is the index type, which must be ordinal, and T2 is any type. 

