Back to table

Invalid Array Declaration

The following is an invalid µOCCAM program. Checks that an array cannot be declared with a non-constant expression

Program file: /public/cs3/web/ipptests/invalid-array-declaration.reject
INT a :
INT b :
SEQ
  a := 1 + 3
  b := 2 + 2
  [a+b]CHAN c :
  STOP