In the statements
pack(a,i,z)
and
unpack(z,a,i)
the value of i shall be assignment compatible with the index type of the array variable a.
For example given:
var a : array[1..100] of real;
z : packed array[1..100] of real;
i : integer;
and
pack(a,i,z) or unpack(z,a,i)
then i shall be assignment compatible with
1..100 (the index-type of a).