; $Id: hfbs_remelinvec.pro,v 1.2 2002/01/14 20:59:25 amunter Exp $
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
function HFBS_RemElInVec,inVector,index
; This routine only works if there are at least two elements
; in the input vector, inVector.
nparms = n_elements(inVector)
newnparms = nparms-1
varType = size(inVector,/type)
case varType of
2:	begin	; integer
	  outVector = intarr(newnparms)
	end
3:	begin	; longword integer
	  outVector = lonarr(newnparms)
	end
4:	begin	; floating point
	  outVector = fltarr(newnparms)
	end
5:	begin	; double precision
	  outVector = dblarr(newnparms)
	end
7:	begin	; string array
	  outVector = strarr(newnparms)
	end
else:
endcase

case index of
0:	begin
    outVector[0:newnparms-1] = inVector[1:nparms-1]
	end
nparms-1:	begin
			outVector[0:newnparms-1] = inVector[0:nparms-2]
			end
else:	begin
		outVector[0:index-1] = inVector[0:index-1]
		outVector[index:newnparms-1] = inVector[index+1:nparms-1]
		end
endcase
return,outVector
end