Back to table

ZZZ Title of your example

The following is invalid µOCCAM. This program assigns values to variables. Variables a and b have been declared, but variable c hasn't. It should therefore complain when trying to assign a to b + c.

Program file: /public/cs3/web/ipptests/undeclared_variable.reject
INT a:
INT b:

SEQ

  a := 3 * 7         -- should like this
  b := 2 *(a + 5)    -- should like this

  a := b + c         -- should not like this