function KEYWORD_DEFINED, Key ;+ ; NAME: ; KEYWORD_DEFINED ; ; PURPOSE: ; This function returns 1 if Key is defined, 0 if not. It is ; often called in conditionals. Note that this is distinct from ; the keyword_set() routine in IDL. In IDL, a keyword can be ; defined and not have a value assigned. ; ; CATEGORY: ; Comet Nucleus Tour CRISP IR Spectrometer calibration pipeline. ; ; CALLING SEQUENCE: ; ; print, KEYWORD_DEFINED(Key) ; ; INPUTS: ; Key: The key whose definedness to test. ; ; OUTPUTS: ; This function returns 1 if Key is defined, 0 if not. ; ; EXAMPLE: ; ; Define an image mask if one is not defined already. Note that ; a mask value of [0] is legal, and would fail the keyword_set() ; test. ; ; if keyword_defined(mask) then begin ; ... ; else ; mask = [1] ; endif ; ; MODIFICATION HISTORY: ; Written by: Joseph Harrington, Cornell. 1996 February 13 ; jh@oobleck.astro.cornell.edu ;- if n_elements(key) eq 0 then return, 0 else return, 1 end