%BEGIN
%owninteger fail=0
%INTEGER I
%INTEGERFN FACT(%INTEGER N,mult)
      %IF N<=1 %THENRESULT=mult
      %RESULT=FACT(N-1,mult*N)
%END
%ROUTINE COMPARE(%INTEGER I,J)
      %UNLESS I=J %START
         PRINTSTRING("ERROR")
         WRITE(I,5); WRITE(J,5)
         Fail=1; NEWLINE
      %FINISH
%END
      COMPARE(FACT(I,1),I*FACT(I-1,1)) %FOR I=2,1,100
      %if fail=0 %then printstring("TEST OK")
%ENDOFPROGRAM
