;+ ; NAME: ; arradd ; PURPOSE: (one line) ; add an array onto another. ; DESCRIPTION: ; Append one array onto a source array. If the source is ; empty, return the appended array ; CATEGORY: ; Util ; CALLING SEQUENCE: ; new = arradd(source, append) ; INPUTS: ; SOURCE = Array to be appended to. ; APPEND = Array to append to SOURCE. ; OUTPUTS: ; NEW - New array with APPEND appended to SOURCE ; PROCEDURE: ; Could call boost_array, but instead we're ; keeping this simple until something more ; complex is needed. See code. ; MODIFICATION HISTORY: ; 2009 July 8 Leslie Young SwRI ; 2009 Sep 9 LAY added addrow keyword ;- function arradd, source, append, addrow = addrow if n_elements(source) eq 0 then return, append if keyword_set (addrow) then begin return, [ [source], [append] ] endif else begin return, [source, append] endelse end