The following is Valid µOCCAM. Tests continuation lines, comments and various constructs.
/public/cs3/web/ipptests-phase-1/various-stuff.accept
VAL this IS a.vaild.program : -- unlike some I could mention
SEQ
WHILE x < 4
SEQ
g (a,b,c,d)
-- correctly indented comment
x := ((5 + 3) *
(2 + 1))/2
PAR
chan1 ? revieve
chan2 ! send
INT programming = (dull + unrewarding) : -- just an opinion
IF v = 1 FOR
ever
x < 7
x := x+1
PROC proc (INT one, CHAN two, INT three, INT four,
CHAN five, INT six, INT seven, CHAN eight)
ALT
x = 5 & chan3 ? t
x:=4
:
finished := TRUE