function OORMO, arg ;+ ; NAME: ; OORMO ; ; PURPOSE: ; Returns "One OR Minus One" Integer Array ; ; RESTRICTIONS: ; If an element of ARG is neither '+' nor '-' RES will be 0 ; ; SEE ALSO: ; OORMO ; ; MODIFICATION HISTORY: ; 03 Mar 2009 Written by Mattia Vaccari ;- if n_elements(arg) eq 0 then begin print,'Argument is undefined! Returning blank string...' res='' goto,FIN endif else if n_elements(arg) eq 1 then begin if arg eq '+' then res = +1 if arg eq '-' then res = -1 endif else begin res=intarr(n_elements(arg)) j=where(arg eq '+') & if j[0] ne -1 then res[j]=+1 j=where(arg eq '-') & if j[0] ne -1 then res[j]=-1 endelse FIN: return, res end