%	SUBROUTINE ADDEXT(FNAME, OUTFIL,EXT)HC_TITLE ADDEXT adds an extension to a filename creating a new file type.CC_ARG:	CHARACTER*(*) FNAME	![I] Filename to add an extension to.8	CHARACTER*3 EXT		![I] Three character extension to add.G	CHARACTER*(*) OUTFIL 	![O] Output filename with extension added to it.C_VAR No variables in common.CKC_DESCRIPTION Subroutine to create a new filetype.  The input filename is aJC filename with an extension.  This routine adds a new file type extensionKC creating a new filename. e.g. Input FILE.FOR becomes FILE.DAT, if DAT was'C the extension passed to this routine. C_HISTORY Robert L. Gurule, 1987C_FILES None.	
C_USER  None.C_END	L1 = LEN(OUTFIL)7!-------Increment backwards looking for a decimal or :.
	DO I=1,321	  IF(FNAME(I:I).EQ.'.'.OR.FNAME(I:I).EQ.':')THEN		    IP=I	    GOTO 40	  ENDIF	ENDDO  40    CONTINUE4!-------Concatenate the type to the output filename.	OUTFIL(1:IP)=FNAME(1:IP)	OUTFIL(IP+1:IP+3)=EXT(1:3)	RETURN	END