;+ ; NAME: ; big_eph_short ; PURPOSE: ; (For internal use by big_eph only) ; CATEGORY: ; gen/idl/ephem ; CALLING SEQUENCE: FUNCTION big_eph_short, bodies, list, names, add_list=add_list, found=found ; INPUTS: ; bodies array; type: string ; list of all requested but not yet accepted bodies ; list array: type: string ; list of bodies in one of the ephemeris data bases ; names array; type: string ; list of all bodies already accepted ; OUTPUTS: ; Result scalar; type: integer ; # new bodies accepted ; OPTIONAL OUTPUT PARAMETERS: ; add_list=add_list array[count]; type: string ; names of new bodies accepted ; The names in 'add_list' are all name in 'list' ; that are not yet in 'names' ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; where_common, IsType ; MODIFICATION HISTORY: ; JUL-2005, Paul Hick (UCSD/CASS) ; OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ; Added found keyword ;- count = 0 add_list = '' tmp = where_common(strlowcase(bodies),strlowcase(list),inref=small_list) IF tmp[0] NE -1 THEN found[tmp] = 1 IF small_list[0] NE -1 THEN BEGIN small_list = small_list[uniq(small_list,sort(small_list))] small_list = list[small_list] ; Explicitly requested bodies CASE IsType(names,/defined) OF 0: BEGIN add_list = small_list count = n_elements(add_list) END 1: BEGIN tmp = where_common(small_list, names, absent=absent) IF absent[0] NE -1 THEN BEGIN count = n_elements(absent) add_list = small_list[absent] ; Bodies not in 'names' yet ENDIF END ENDCASE ENDIF RETURN, count & END