UNDEFINE







Syntax




   UNDEFINE  \symbol


Description




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.



Examples




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;


Notes




The DEFINE and UNDEFINE commands always translates to blank commands. In echo mode, they are echoed as empty pairs of parentheses (see ECHO).



Related Topics




  1. Define
  2. Inquire
  3. Tailoring The Command Language
  4. The Percy Help System