         Edinburgh IMP77 Compiler - Version 8.4
    1
    2 %BEGIN
    3 !***********************************************************************
    4 !*    A TEST TO CHECK THE LINE NUMBER OF A FAILURE AT RUN TIME         *
    5 !***********************************************************************
    6 %INTEGERARRAY A(0:4)
    7 %INTEGER I
    8 %on %event 1,2,3,4,5,6,7,8,9 %start
    9 ->continue
   10 %finish
   11 I=10
   12 %IF 1<0 %THEN %START
   13       !
   14       !
   15       %STOP
   16 %FINISH %ELSE A(I)=A(I)+1
   17       !
   18 continue:
   19 printstring("event trapped ")
   20 write(eventinf>>8,5); write(eventinf&255,5)
   21 newline
   22 printstring("Line of failure =")
   23 write(eventline,4)
   24 newline
   25 %ENDOFPROGRAM
   18 Statements compiled
