C***********************************************************************
C***********************************************************************
C TYPES TEXT AND CURRENT VALUE OF PARAMETER.
C   IF NEW LINE IS TYPED IN RESPONSE, OLD VALUE IS RETURNED.
C   OTHERWISE PARAMETER IS UPDATED WITH VAULE ENTERED IN RESPONSE.
	SUBROUTINE READ_PAR_I4(TEXT,PAR1)
	INTEGER*4 PAR1,PARI4
	CHARACTER*(*) TEXT
	INTEGER SPACE_POS
	CHARACTER*80 BUFFER
	CHARACTER*80 FILL/' '/
	CHARACTER*4 I_FORMAT/'(I1)'/
C	CHARACTER*8 R_FORMAT/'(F10.0)'/
	PARI4=PAR1
C
C GET LENGTH OF TEXT STRING
C
	ILEN=LEN(TEXT)
	JLEN=1
	IF(ILEN.LT.50) JLEN=50-ILEN
C
 100	WRITE(*,*)TEXT,FILL(:JLEN),' I*4 [',PARI4,'] '
!              WRITE(*,*) 'readpar.for L23'
C
	READ(*,'(A)')BUFFER
!	WRITE(*,*) 'readpar.for L26'
	SPACE_POS=INDEX(BUFFER,' ')
!	WRITE(*,*) 'readpar.for L27'
	IF (SPACE_POS.EQ.1) RETURN
!	WRITE(*,*) 'readpar.for L29'
C
		WRITE(I_FORMAT(3:3),'(I1)',ERR=200)SPACE_POS-1
		READ(BUFFER,I_FORMAT,ERR=200)PARI4
	PAR1=PARI4
!	WRITE(*,*) 'readpar.for L32'
	RETURN
 200	WRITE(*,'(1X,A)')'TYPING ERROR, TRY AGAIN<CR>'
	GO TO 100

	WRITE(*,*) 'readpar.for L36'

	END
C***********************************************************************
C TYPES TEXT AND CURRENT VALUE OF PARAMETER.
C IF NEW LINE IS TYPED IN RESPONSE, OLD VALUE IS RETURNED.
C OTHERWISE PARAMETER IS UPDATED WITH VAULE ENTERED IN RESPONSE.
	SUBROUTINE READ_PAR_I2(TEXT,PAR1)
	INTEGER*2 PAR1,PARI2
	CHARACTER*(*) TEXT
	INTEGER SPACE_POS
	CHARACTER*80 BUFFER
	CHARACTER*80 FILL/' '/
	CHARACTER*4 I_FORMAT/'(I1)'/
C	CHARACTER*8 R_FORMAT/'(F10.0)'/
	PARI2=PAR1
C
C GET LENGTH OF TEXT STRING
C
	ILEN=LEN(TEXT)
	JLEN=1
	IF(ILEN.LT.50) JLEN=50-ILEN
C
 100	WRITE(*,*)TEXT,FILL(:JLEN),' I*2 [',PARI2,'] '
C
	READ(*,'(A)')BUFFER
	SPACE_POS=INDEX(BUFFER,' ')
	IF (SPACE_POS.EQ.1) RETURN
C
		WRITE(I_FORMAT(3:3),'(I1)',ERR=200)SPACE_POS-1
		READ(BUFFER,I_FORMAT,ERR=200)PARI2
	PAR1=PARI2
	RETURN
 200	WRITE(*,'(1X,A)')'TYPING ERROR, TRY AGAIN<CR>'
	GO TO 100
	END
C***********************************************************************
C TYPES TEXT AND CURRENT VALUE OF PARAMETER.
C IF NEW LINE IS TYPED IN RESPONSE, OLD VALUE IS RETURNED.
C OTHERWISE PARAMETER IS UPDATED WITH VAULE ENTERED IN RESPONSE.
	SUBROUTINE READ_PAR_R4(TEXT,PAR1)
	REAL*4 PAR1,PARR4
	CHARACTER*(*) TEXT
	INTEGER SPACE_POS
	CHARACTER*80 BUFFER
	CHARACTER*80 FILL/' '/
C	CHARACTER*4 I_FORMAT/'(I1)'/
	CHARACTER*8 R_FORMAT/'(F10.0)'/
	PARR4=PAR1
C
C GET LENGTH OF TEXT STRING
C
	ILEN=LEN(TEXT)
	JLEN=1
	IF(ILEN.LT.50) JLEN=50-ILEN
C
 100	WRITE(*,*)TEXT,FILL(:JLEN),' R*4 [',PARR4,'] '
C
	READ(*,'(A)')BUFFER
	SPACE_POS=INDEX(BUFFER,' ')
	IF (SPACE_POS.EQ.1) RETURN
C
		WRITE(R_FORMAT(3:4),'(I2.2)',ERR=200)SPACE_POS-1
		READ(BUFFER,R_FORMAT,ERR=200)PARR4
	PAR1=PARR4
	RETURN
 200	WRITE(*,'(1X,A)')'TYPING ERROR, TRY AGAIN<CR>'
	GO TO 100
	END
C***********************************************************************
C TYPES TEXT AND CURRENT VALUE OF PARAMETER.
C IF NEW LINE IS TYPED IN RESPONSE, OLD VALUE IS RETURNED.
C OTHERWISE PARAMETER IS UPDATED WITH VAULE ENTERED IN RESPONSE.
	SUBROUTINE READ_PAR_R8(TEXT,PAR1)
	REAL*8 PAR1,PARR8
	CHARACTER*(*) TEXT
	INTEGER SPACE_POS
	CHARACTER*80 BUFFER
	CHARACTER*80 FILL/' '/
	CHARACTER*8 R_FORMAT/'(F10.0)'/
	PARR8=PAR1
C
C GET LENGTH OF TEXT STRING
C
	ILEN=LEN(TEXT)
	JLEN=1
	IF(ILEN.LT.50) JLEN=50-ILEN
C
 100	WRITE(*,*)TEXT,FILL(:JLEN),' R*8 [',PARR8,'] '
C
	READ(*,'(A)')BUFFER
	SPACE_POS=INDEX(BUFFER,' ')
	IF (SPACE_POS.EQ.1) RETURN
C
		WRITE(R_FORMAT(3:4),'(I2.2)',ERR=200)SPACE_POS-1
		READ(BUFFER,R_FORMAT,ERR=200)PARR8
	PAR1=PARR8
	RETURN
 200	WRITE(*,'(1X,A)')'TYPING ERROR, TRY AGAIN<CR>'
	GO TO 100
	END
C***********************************************************************
