;+
; PROJECT:
;	SDAC
; NAME: 
;	Load_Main
;
; PURPOSE:
;	This routine extracts a set of variables from the SPEX common blocks.
;
; CATEGORY:
;	SPEX
;
; CALLING SEQUENCE:
;	result = SPEX_OUT( /var1, /var2, /var3, ...)
;
; CALLS:
;	none
;
; KEYWORD INPUTS:
;       Variable names found in SPEX_COMMONS, e.g. e_in
;
; OPTIONAL INPUTS:
;	none
;
; OUTPUTS:
;       none explicit, only through commons;
;
; OPTIONAL OUTPUTS:
;	none
;
; KEYWORDS:
;	none
; COMMON BLOCKS:
;	SPEX_PROC_COM, SPEX_HOLD_COM, SPEX_SETUP_COM
;
; SIDE EFFECTS:
;	none
;
; RESTRICTIONS:
;	none
;
; PROCEDURE:
;	none
;
; MODIFICATION HISTORY:
;	Version 1, richard.schwartz@gsfc.nasa.gov, 4-feb-1998.
;-
function spex_out, _extra=_extra

@spex_commons
if data_chk(_extra,/struc) then patterns = tag_names(_extra)

out = { zdummy:0 }




n=n_elements(patterns)
for i=0,n-1 do begin
	temp = spex_current(patterns(i))
        out  = add_tag(out, temp, patterns(i))
endfor

return, out(0)
end
