Multiple names

Here is an identity declaration for a name which can refer to a multiple::

   REF[]INT i7 = LOC[1:7]INT

There are two things to notice about this declaration. Firstly, the mode on the left-hand side is known as a formal-declarer. It says what the mode of the name is, but it says nothing about how many elements there will be in any multiple to be assigned, nor what its bounds will be. All the identity declarations for multiples in chapter 3 used formal-declarers on the left-hand side. In fact, only formal-declarers are used on the left-hand side of any identity declaration.

Secondly, the generator on the right-hand side is an actual-declarer. It specifies how many elements can be assigned. In fact, the trimmer represents the bounds of the multiple which can be assigned. If the lower bound is 1 it may be omitted, so the above declaration could well have been written

   REF[]INT i7 = LOC[7]INT

which can be read as “ref row of int i7 equals loc row of seven int”. The bounds of a multiple do not have to start from 1 as we saw in chapter 3. In this identity declaration

   REF[]INT i7 at 0 = LOC[0:6]INT

the bounds of the multiple will be [0:6].

Sian Mountbatten 2012-01-19