;+ ; NAME: ; HXISREM_DBLE ; PURPOSE: ; Remove double entries from an array ; CATEGORY: ; Utility ; CALLING SEQUENCE: ; OUT = hxisrem_dble(in,length=n) ; INPUTS: ; IN input array ; OUTPUTS: ; OUT output array with double entries removed ; OPTIONAL OUTPUT PARAMETERS: ; N number of elements in OUT ; MODIFICATION HISTORY: ; MAY-1991, Paul Hick (ARC) ;- function HXISREM_DBLE, IN, length=N, error=error @hxiswidget.common error = 0 ; assume succes if n_elements(IN) eq 0 then begin widget_control, comment, set_value='Error, Input array does not ' + $ 'exist',/append error = 1 return, 0 endif OUT = IN N = n_elements(OUT)-1 I = -1 while I lt N-1 do begin I = I+1 B = OUT(I+1:N) & OUT = OUT(0:I) & C = where(B ne OUT(I),N) if N ne 0 then OUT = [OUT,B(C)] N = I+N endwhile N = N+1 return, OUT end