Back to table

Seq, Proc, While Test

The following is valid µOCCAM. A small test of Seq, Proc and While

Program file: /public/cs3/web/ipptests-phase-1/dsxw.accept
--A simple procedure test
PROC incr (INT x)
  x := x + 1
:

INT x = 0:
INT y = 0:
SEQ
  SEQ x = 0 FOR 10
    incr (y)
  WHILE y < 20
    incr (y)
  STOP