Back to table

Bad Declaration (Missing)

The following is an invalid µOCCAM program. The variable z is used but not declared.

Program file: /public/cs3/web/ipptests/bad-dec.reject
INT x:  -- declare variable x
INT y:  -- declare variable y

PAR
  x := 1 + 1
  y := 1 + 2
  z := 1 + 3  -- this is incorrect

  -- z undeclared