content_image/694585.jpg
Arrays provide a means of grouping under a single name several variables having identical characteristics. An array variable declaration gives a name to the entire array structure. Two operations valid for entire array variables are assignment and selection of components. A component is selected by specifying the name of the array variable followed by an ordinal expression enclosed in square brackets. The operations permitted on such a component variable are those which are valid for any variable of the component type of that array type. 

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

Examples of variable declarations: 

Examples of sample assignments: 

Memory: array [0 .. Max) of Integer Sick: packed array [Days) of Boolean 

Memory [I+J) := X Sick[Mon) := true 

(Of course these examples assume the definition of the auxiliary identifiers. ) 

Programs 6.1 and 6.2 illustrate the use of arrays. Consider how you would extend Program 6.2 to plot more than one function - both with and without the use of an array. 

