         Edinburgh IMP77 Compiler - Version 8.4

    1  %CONTROL X'10000000' ; ! Decode
    2  %BEGIN
    3    %INTEGERFN ACKERMANN(%INTEGER M, N)
    4  
    5     %RESULT = N+1 %IF M = 0
    6  
    7     %RESULT = ACKERMANN(M-1, 1) %IF N = 0
    8  
    9     %RESULT = ACKERMANN(M-1, ACKERMANN(M, N-1))
   10  
   11    %END
   12  
   13    %INTEGER I
   14  
   15    I = ACKERMANN(3,4)
   16    PRINT STRING("ACKERMANN(3,4) = ")
   17    WRITE(I, -1)
   18    NEWLINE
   19    
   20  %ENDOFPROGRAM

   13 Statements compiled
