         Edinburgh IMP77 Compiler - Version 8.4

    1  %systemroutine print(%real x, %integer n,m)
    2  %constreal pmax = 2147483647.0
    3  %real y,z
    4  %integer i=0,l,count=0,sign
    5    sign = ' '
    6    sign = '-' %if x < 0
    7    y = |x|+0.5/10.0\{^}m;  !modulus, rounded
    8    %if y > pmax %start
    9      count = count+1 %and y = y/10.0 %until y < 10.0
   10    %finish
   11    z = 1.0
   12    %cycle
   13      i = i+1;  z = z*10.0
   14    %repeat %until z > y
   15    spaces(n-i)
   16    printsymbol(sign) %unless sign = ' ' %and n <= 0
   17    %cycle
   18      z = z/10.0
   19      l = int pt(y/z)
   20      y = y-l*z
   21      printsymbol(l+'0')
   22      i = i-1
   23      %exit %if i+m <= 0
   24      print symbol('.') %if i = 0
   25    %repeat
   26    printsymbol('@') %and write(count,0) %if count # 0
   27  %end;  !print
   28  
   29  %endoffile

   29 Statements compiled
