function hex2decf, hexstr
;+
; $Id: hex2decf.pro,v 1.4 2022/04/20 19:23:37 nathan Exp $
;
; Project   : STEREO SECCHI
;                   
; Name      : hex2decf
;               
; Purpose   : return decimal integer from hex string
;               
; Explanation: 
;               
; Use       : IDL> 
;    
; Inputs    :   

; Optional Inputs: 
;               
; Outputs   : 

; Optional Outputs: 
;
; Keywords  :   

; Calls from LASCO : 
;
; Common    : 
;               
; Restrictions: 
;               
; Side effects: 
;               
; Category    : 
;               
; Prev. Hist. : None.
;
; Written     : Nathan Rich, NRL/I2, Apr 05
;               
; $Log: hex2decf.pro,v $
; Revision 1.4  2022/04/20 19:23:37  nathan
; allow array input
;
; Revision 1.3  2007/02/13 17:16:06  antunes
; Restoring all the files deleted due to SolarSoft rollback.
;
; Revision 1.1  2005/04/21 19:26:16  nathan
; no comment
;
;-            

n=n_elements(hexstr)
p=strpos(hexstr[0],'x')
IF p GE 0 THEN hextr=strmid(hexstr,p+1)
p=strpos(hexstr[0],'X')
IF p GE 0 THEN hextr=strmid(hexstr,p+1)
number=dblarr(n)
FOR i=0,n-1 DO BEGIN
hex2dec, hexstr[i],ni,/quiet
number[i]=ni
ENDFOR
return, number

end
