	SUBROUTINE PROMPT(N,IDS,I,X,A)
C 
C	IF N=1, PROMPTS AND RETURNS INTEGER IN "I"
C	IF N=2,    "          "     REAL VALUE IN "X"
C	IF N=3,    "          "     CHARACTER IN "A"
C	IDS IS STATUS CODE:
C		1=SUCCESSFUL PROMPT
C		0=INVALID N
C	       -1=END OF FILE (CNTRL-Z ENTERED)
C	ROUTINE WILL RE-PROMPT IF AN ERROR IS ENCOUNTERED
	LOGICAL*1 A
	IDS=0
1	IF(N.EQ.1) READ(5,10,ERR=4,END=5) I
	IF(N.EQ.2) READ(5,11,ERR=4,END=5) X
	IF(N.EQ.3) READ(5,12,ERR=4,END=5) A
	IF(N.GT.0.AND.N.LT.4) IDS=1
	GOTO 6
4	WRITE(5,7)  "7
7	FORMAT(' Enter again: ',A1,$)
	GOTO 1
5	CALL CLOSE(5)
	IDS=-1
6	RETURN
10	FORMAT(I6)
11	FORMAT(F10.0)
12	FORMAT(A1)
	END
