;+
;
; NAME: 
;       ASC_HEX_2B
;
; PURPOSE:
; Converts ASCII hexidecimal to binary value.
; Function appears to be obsolete.
;
; CATEGORY:
;	BATSE, GEN
;
; CALLING SEQUENCE:
;       result = asc_hex_2b( a_hex )
;
; CALLS:
;	none
;
; INPUTS:
;       none explicit, only through commons;
;
; OPTIONAL INPUTS:
;	none
;
; OUTPUTS:
;       none explicit, only through commons;
;
; OPTIONAL OUTPUTS:
;	none
;
; KEYWORDS:
;	none
; COMMON BLOCKS:
;	none
;
; SIDE EFFECTS:
;	none
;
; RESTRICTIONS:
;	none
;
; PROCEDURE:
;	none
;
; MODIFICATION HISTORY:
; Shelby Kennard                                5Feb1991
;
;-
function asc_hex_2b,a_hex
;
;
;**********************************************************************
ahx_arr = '0123456789ABCDEF' ; String array of valid Hex values'
;
b_hex = byte(a_hex)
bhx_arr = byte(ahx_arr)
;
n_char = n_elements(b_hex)
all_w = intarr(n_char)
;
for n=0,n_char-1 do begin ; Compare each character with valid Hex characters'
  w=where(bhx_arr eq b_hex(n)) ; Position reflects value.
  all_w(n) = w(0) 
endfor
;
s16s = reverse(16l^(indgen(n_char<10)))
num = long(total(s16s*all_w))
return,num
end
