	SUBROUTINE YESNO(I)
C 
C	ROUTINE RETURNS 0 FOR NO, 1 FOR YES, AND -1 FOR END OF FILE
C	(END OF FILE CAN BE ENTERED WITH CNTRL-Z)
	LOGICAL*1 ANS
1	I=-1
	READ(5,2,END=3) ANS
2	FORMAT(A1)
	I=0
	IF(ANS.EQ.'N'.OR.ANS.EQ.'n') GOTO 4
	I=1
	IF(ANS.EQ.'Y'.OR.ANS.EQ.'y') GOTO 4
	WRITE(5,5) "7
5	FORMAT(' Answer YES or NO: ',A1,$)
	GOTO 1
3	CALL CLOSE(5)
4	RETURN
	END
