     	SUBROUTINE SHOWPN
C
C  PROGRAMMER:  R.S. ZHOU
C		ALFRED UNIVERSITY, FEB-1987
C
C	THIS ROUTINE LISTS THE CURRENT SECTION OF PATTERN
C	IN THE RAW DATA ARRAY "YOBS" ON THE SCREEN ----
C	10 POINTS PER LINE...
C
     	INCLUDE 'FILECONV.CBS'
     	CHARACTER IQS*1
     	DIMENSION IDATA(10)

C         TYPE*,'NPTS=',NPTS

C        DO I=1,NPTS
C        IF(I.GE.4950 .AND. I.LE.5050) THEN
C        TYPE*,' *** YOBS(',I,')=',YOBS(I)
C        ENDIF
C        ENDDO


     	NPN2 = 0
111	NPN1 = NPN2 + 1
     	NPN2 = NPN1 + 199
     	IF( NPN2.GT.NPTS ) NPN2 = NPTS
     	CALL CLEARS( 0 )			!CLEAR THE SCREEN
C
C  DISPLAY HEADER INFORMATION...
C
     	CALL COLORS(-1)
     	CALL COLORS(80)
     	CALL PUTEXT( '   P A T T E R N   L I S T  (CPS)   ', 36, 1, 20 )
     	CALL COLORS(1)
     	CALL COLORS(90)
     	WRITE(6,2)
2	FORMAT(' STARTING TWO-THETA =',11X,'ENDING TWO-THETA =',
     	111X,'STEPSIZE =',10X,' ')
     	BEGIN = DANG(1) + (NPN1-1)*DANG(3)
     	END   = DANG(1) + (NPN2-1)*DANG(3)
     	CALL COLORS(-1)
     	CALL PUTFFL( BEGIN,   1, 7.3, 2, 22 )
     	CALL PUTFFL( END  ,   1, 7.3, 2, 51 )
     	CALL PUTFFL( DANG(3), 1, 7.3, 2, 72 )
C
C  START DATA POINTS LISTING...
C
     	ILINE = 2
     	NPT = 0
     	NP1 = DANG(3)/BANG(3) + 0.1
     	NP2 = 1 + INT((BEGIN-BANG(1))/BANG(3)+0.1)
     	NPN1 = NPN2 - NPN1 + 1
     	DO 333 I= 1, NPN1
     	   NPT = NPT + 1
     	   IDATA(NPT) = YOBS(NP2+(I-1)*NP1)/DANG(10)
     	   IF( I.LT.NPN1 .AND. NPT.LT.10 ) GOTO 333
     	   ILINE = ILINE + 1
     	   DO J=1, NPT
     	      CALL PUTIFL( IDATA(J), 1, 7, ILINE, 1+(J-1)*8 )
     	   ENDDO
     	   NPT = 0
333	CONTINUE

     	CALL COLORS(1)
     	WRITE(6,222)
222	FORMAT(/'$Hit RETURN to continue(CTRL_Z=QUIT)...')
     	READ(5,223,ERR=999,END=999) IQS
223	FORMAT(A)
     	IF( NPN2.LT.NPTS ) GOTO 111
999	RETURN
     	END
