Next: , Previous: Array size-equivalence, Up: Arrays


4.4 Declarations

Arrays of any type (parameters, channels, processes, datatypes) are declared the same way. Two syntaces are available for declarations. For example, a 1-D array may be declared using:

The first form explicitly specifies the range to instantiate, whereas the second form implicitly starts instantiating from 0 and ends at one less than the evaluated integer argument. The second form is just a convenient syntax for a common construct.

Multidimensional arrays are declared with multiple dimension specifiers. Each dimension of a multidimensional array may be specified using either style.

Instance declarations that extend an existing array are no different, as long as the added range doesn't overlap with previous declarations.

Object implementation detail: Ranges of the second form are expanded out in the intermediate format.

Tracking the state of instantiations w.r.t. references.