C****************************************************************
C* 								*
C*								*
C*	DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY *
C*	EITHER FOR THE CREATION OR FOR THE CLINICAL EFFICACY	*
C*	OF THIS PROGRAM. USERS MUST ASSUME FULL RESPONSIBILITY	*
C*	FOR ANY RESULTS OR DIAGNOSES OBTAINED FROM THE USE	*
C*	OF THIS PROGRAM. QUESTIONS ON THE EXECUTION OF THIS	*
C*	PROGRAM MUST BE REFERRED BACK TO THE ORIGINAL AUTHOR.	*
C*								*
C* AUTHOR:	SALLY FORSTER					*
C*		C/O DEPARTMENT OF NUCLEAR MEDICINE		*
C*		GUY'S HOSPITAL				*
C*		LONDON, ENGLAND					*
C*								*
C*		TEL: 01-407-7600 EXT 2583/4			*
C*								*
C****************************************************************
	SUBROUTINE RBGAMA(ICM)
	IMPLICIT LOGICAL*1 (A)
	IMPLICIT REAL*4    (C)
	IMPLICIT INTEGER*2 (D-Z)
	COMMON//SAVDES(256),CURVE1(512),CURVE2(512),ICS,ICB
	COMMON/MAC/AMACRO
	COMMON/IN/NA,A(76),LP,ASEMIC,ASPACE
	DIMENSION AINS(4)
C*****RB..96
860	CALL CLOSEC(ICB)
	CALL CLEAR
	IF(AMACRO)CLOSE (UNIT=ICM)
5	IF(NA.LE.LP)CALL BGAMMA('')
	IF(A(LP).NE.ASPACE)GOTO 10
	LP=LP+1
	GOTO 5
10	AINS(1)=A(LP)
	AINS(2)=A(LP+1)
	AINS(3)=A(LP+2)
	AINS(4)=A(LP+3)
	CALL BGAMMA(AINS)
C*****NO RETURN
	STOP 'ERROR'
	END
