next up previous contents
Next: Multidimensional arrays Up: Data types and type Previous: Boolean, enumerated and subrange   Contents

Arrays

An array of signals is declared in the following way:

        <signal> : array <x>..<y> of <type>;
This declares a collection of signals of type <type>, with subscripts running from <x> to <y>. For example, the declaration

        zip : array 2..0 of boolean;
is equivalent to declaring.

        zip[2] : boolean;
        zip[1] : boolean;
        zip[0] : boolean;

An element of an array can be referenced by adding a subscript in square brackets. The subscript must evaluate to an integer in the declared range of the array.



2002-10-28