Back to table

All Declared

The following is a valid µOCCAM program. All the variables have been declared before use, and a constant value has been declared. A sequence of 3 variable assignments is then carried out, with some of the assignments using previous results, as well as the constant value.

Program file: /public/cs3/web/ipptests/expressionSeq.accept
INT a = 0: --declaring 3 variables
INT b = 3:
INT c:
VAL d IS 5: --declaring a constant

SEQ
  c := b + d
  a := c * 12
  b := a + d