
%BEGIN
%LONGINTEGER L,M,N
! TEST OF LINT & LINTPT
%LONGLONGREAL X
%INTEGER I,J
      L=X'FEDCBA98FEDCBA98'

      %FOR J=0,1,1 %CYCLE
         %FOR I=0,1,30 %CYCLE
            N=(-1)****J*(L>>I)
            X=N-0.001
            M=LINTPT(X)
            %UNLESS N=M+1 %START
               {%monitor}
               WRITE(I,1)
               PRINTFL(N,16)
               PRINTFL(X,15)
               WRITE(N-M,5)
               NEWLINE
               %stop
            %FINISH
            N=-N
            X=-X;                       ! POINTLESS EXCEPT TO TEST NEGATE
            M=LINT(X)
            %UNLESS M=N %START
               {%monitor}
               WRITE(I,1)
               WRITE(N-M,5)
               NEWLINE
                  %stop
            %FINISH
         %REPEAT
      %REPEAT
      PRINTSTRING("TEST OK")
%ENDOFPROGRAM
