Viewing contents of file '../idllib/ssw/allpro/append_arr.pro'
;+
; Project : SOHO - CDS
;
; Name : APPEND_ARR
;
; Category : Utility
;
; Purpose : Manageable method for concatanating arrays
;
; Explanation :
;
; Syntax : IDL> result=append_arr(input,extra)
;
; Inputs : INPUT = array (or scalar) that requires appending
; EXTRA = array (or scalar) to append
;
; Opt. Inputs : None
;
; Outputs : None
;
; Opt. Outputs: None
;
; Keywords : SAME = set to force matching same array types
;
; Common : None
;
; Restrictions: None
;
; Side effects: None
;
; History : Version 1, 1-Oct-1998, D.M. Zarro. Written
;
; Contact : DZARRO@SOLAR.STANFORD.EDU
;-
function append_arr,input,extra,same=same
n1=data_chk(input,/ndim)
n2=data_chk(extra,/ndim)
d1=data_chk(input,/def)
d2=data_chk(extra,/def)
t1=data_chk(input,/type)
t2=data_chk(extra,/type)
if d1 and d2 then begin
doit=(n1 eq n2) or (n1 eq 0) or (n2 eq 0)
if keyword_set(same) then doit=(t1 eq t2)
if doit then return,[input,extra]
endif
if d1 then return,input
if d2 then return,extra
end