C
C COPYRIGHT (C) 1976
C DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
C
C THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY
C ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH
C THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS
C SOFTWARE, OR ANY OTHER COPIES THEREOF, MAY NOT BE PRO-
C VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON
C EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO
C THESE LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE
C SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.
C
C THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE
C WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COM-
C MITMENT BY DIGITAL EQUIPMENT CORPORATION.
C
C DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
C OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY
C DEC.
C
	SUBROUTINE GNUM(IOUT,IMAX,IBASE)
	IMPLICIT INTEGER (A-Z)
	REAL WHAT
	DIMENSION IN(10)
	DATA WHAT/'WHAT?'/
	DATA BLANK/' '/
10	FORMAT(10A1)
1	READ(10,10)IN
	DO 20 I=1,10
	IF(IN(11-I).NE.BLANK) GO TO 30
20	CONTINUE
	IOUT=0
	RETURN
30	IOUT=0
	I=11-I
	DO 40 J = 1,I
	K=IN(J)[0:6]
	IF(K.LT.#60.OR.K.GT.#60+IBASE-1) GO TO 100
	IOUT=IOUT*IBASE+(K-#60)
40	CONTINUE
	IF(IOUT.GT.IMAX) GO TO 100
	RETURN
100	WRITE(11,110) WHAT
110	FORMAT(1X,1A5)
	GO TO 1
