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****************************************************************
	FUNCTION SEARCH(INCOM)
C*****DOES A LOGARITHMIC SEARCH ON THE TWO CHARACTER PARAMETER
C*****AGAINST THE COMMAND TABLE ICOMT
C*****RETURNS THE COMMAND NO.AS THE FUNCTION VALUE
C*****RETURNS SEARCH<0 IF THE COMMAND IS NOT FOUND
	IMPLICIT INTEGER*2 (D-Z)
	DIMENSION ICOMT(64),ICOMC(64)
	DATA ICOMT/'DA','NA',
	<'AC','DC','HC','MC','OC','SC',
	<'CD','GD','ND','PD','VD',
	<'PE',
	<'EF','GF','LF','PF','TF',
	<'DH','EH',
	<'FI','NI','PI',
	<'CL','GL','NL','PL',
	<'CM','EM','NM','PM','RM','TM',
	<'EN','GN','IN','ON','RN','TN',
	<'KP','OP','PP','RP','TP',
	<'BR','IR','SR',
	<'BS','CS','MS','NS',
	<'CT','NT','OT',
	<'AV','DV','IV','MV','SV',
	<'DW','SW',
	<'ZZ','ZZ'/
	DATA ICOMC/7,11,
	<30,33,57,32,16,31,
	<4,87,14,62,10,
	<81,
	<50,51,52,53,54,
	<83,82,
	<89,55,85,
	<15,80,84,59,
	<91,92,13,93,94,9,
	<95,88,86,6,23,21,
	<60,5,58,22,20,
	<96,17,1,
	<8,3,56,12,
	<27,29,28,
	<63,66,67,65,64,
	<61,2,
	<2*-1/
	K=32
	N=32
	DO 20 I=1,6
	IF(K.GT.64)GOTO 30
	N=IABS(INT(FLOAT(N)/2))
	IF(ICOMT(K)-INCOM)20,50,10
10	N=N*-1
20	K=K+N
30	SEARCH=-1
	RETURN
50	SEARCH=ICOMC(K)
	RETURN
	END
