begin
constintegerarray fred(0:2) = ;
1,2,
3
routine jim(integer p,
integer q)
end
constc
integerarray sheila(0:2) =
1,2,
3
switch lab(1:4)
integer i
constinteger one=1, two=2, three=3
i = sheila(2)
lab(':'+one+two-':'):
;! commc
print string("test 0"); newline
print string("If there is output mentioning test 0 above, test 0 passed"); newline
comment c
print string("test 1"); newline ;
print string("If there is output mentioning test 1 above, test 1 passed"); newline
comment c
print string("test 2a failed - this is part of the comment above") and newline; print string("test 2b failed - semicolons should not be honoured in %comments"); newline
print string("If there is no output mentioning test 2 above, test2 passed"); newline
comment c
print string("test 3"); newline
print string("If there is output mentioning test 3 above, test 3 passed"); newline
comment c
print string("test 4"); newline
print string("If there is output mentioning test 4 above, test 4 passed"); newline
lab(':'+two+two*':'-':'*3): i=10
comment ' { again
%comment { 'again
comment '
%comment %c
This this part of the comment in Imp77!
! %c
print string("Note that %c is not honoured within a '!' comment..."); newline
! a comment with an unbalanced ' is a problem
print string("test 5 passed"); newline
print string("test 6 passed"); newline
print string("test 7 passed"); newline
comment a comment with an unbalanced ' is a problem
print string("test 8 passed"); newline
lab(*):
!}
%end{}%of%pro %gram
'