[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Abbreviation of arrays, scope.

Hi -

(This question relates to Kroc1.0.3B on Linux GLIBC 2.1)

Has the occam(2.1) spec changed since the snippet below?  
The code below shouldn't compile, as the array z should not
be able to be referenced. 




Occam 2.1 Manual, SGS Thompson
[72 occ 45 03] P. 42

"Where an abbreviation is of a component of an array, no other
reference may be made to any other part of that array, except
in a further abbreviation...."


PROC badAbb([]INT z)
  INT x IS z[2]:
    x := 3
    z[4] := 3:

PROC test (CHAN OF BYTE key, screen, error)
  [32]INT z: