The following is a valid µOCCAM program. Test Program by Alasdair Gray Assigns 2 varibles with values, the second relying on the first using different types of assignment. Simple while loop executed in sequence The EOF is at the end of the comment.
/public/cs3/web/ipptests/whileEof.accept
-- Test Program by Alasdair Gray VAL a IS 6: INT b = a + 4: -- declarations SEQ WHILE b > a -- simple while loop b := b - 1 STOP -- End of File