UNDEFINE \symbol
The UNDEFINE command removes a symbol from the symbol table. (Symbols are
created by the DEFINE and INQUIRE commands.) Removing a symbol that has not
been defined has no effect.
In the following example, the UNDEFINE command is used to remove the
definitions of symbols created by a procedure.
;
; This procedure finds intervals when a given satellite is not
; obscured by its primary planet. (That is, intervals when the
; satellite is not occulted or eclipsed by the planet, and not
; in transit across the planet.)
;
; The symbols SATELLITE, PLANET, OBSERVER and STEPSIZE are
; defined at the beginning of the procedure, and undefined
; at the end.
;
; Definition of the symbol OUTPUT_SCHEDULE is optional.
;
; The names OCC, ECL, TRN, and OBSCURED are used for temporary
; schedules. The schedules are dropped at the end of the procedure.
; Existing schedules with those names will be lost.
;
INQUIRE SATELLITE;
INQUIRE PLANET;
INQUIRE OBSERVER;
INQUIRE STEPSIZE;
FIND OCC OCCULTATION
OF SATELLITE BY PLANET
FROM OBSERVER
STEP SIZE STEPSIZE;
FIND ECL ECLIPSE
OF SATELLITE BY PLANET
FROM OBSERVER
STEP SIZE STEPSIZE;
FIND TRN TRANSIT
OF SATELLITE ACROSS PLANET
FROM OBSERVER
STEP SIZE STEPSIZE;
LET OBSCURRED = OCC + ECL;
LET OBSCURRED = TRN + OBSCURRED;
LET OUTPUT_SCHEDULE = OBSCURRED COMPLEMENT;
FORGET SCHEDULE OCC;
FORGET SCHEDULE ECL;
FORGET SCHEDULE TRN;
FORGET SCHEDULE OBSCURED;
UNDEFINE SATELLITE;
UNDEFINE PLANET;
UNDEFINE OBSERVER;
The DEFINE and UNDEFINE commands always translates to blank commands. In echo
mode, they are echoed as empty pairs of parentheses (see ECHO).