FUNCTION extensio,files ; ; This function returns a STRING array giving the extensions (i.e., ; the part after the '.') in the STRING array of file names passed ; in 'files'. ; out=files FOR i=0,N_ELEMENTS(files)-1 DO BEGIN dotpos=STRPOS(files(i),'.') IF dotpos(0) NE -1 $ THEN out(i)=STRMID(files(i),dotpos(0)+1,STRLEN(files(i))-dotpos-1) $ ELSE out(i)='-1' ; missing file name ?!? ; The next two lines won't work under DOS as presently coded. gzpos=STRPOS(out(i),'.gz') IF (gzpos(0) NE -1) THEN out(i)=STRMID(out(i),0,gzpos(0)) ENDFOR RETURN,out END