[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Questions: undefining stuff in MCL

Hello all,

Thanks in advance for taking the time and trouble to help me out.  I am
a new MCL user and I have some basic questions about undefining entities
in MCL.  This is in the context of the following situations:

 1.  Suppose I'm in MCL and I want to wipe out all of the definitions
     I have created.  Is there any way to do this without quitting MCL
     and restarting it?  I notice that when I close the "listener" window,
     a new one appears, but it seems to "remember" everything from the
     previous listener window.

 2.  In experimenting with OOP, I tried the following, in order:

     [1]  (defstruct account (name "") (balance 0.00) (interest-rate .06))

     Later, I decided I wanted to do try this example in CLOS and define
     a class called account.

     [2]  (defclass account ()
            ((name :initarg :name :reader name)
             (balance :initarg :balance :initform 0.00 :accessor balance)
             (interest-rate :allocation :class :initform .06 
                      :reader interest-rate)))
     I got the following error message, which suggests that somehow [1]
     prevented the successful execution of [2].  (I confirmed this by 
     restarting MCL and executing [2] only, and it succeeded.)

     > Error: #<STRUCTURE-CLASS ACCOUNT> is not an instance of
     > While executing: CCL::%DEFCLASS
     > Type Command-/ to continue, Command-. to abort.
       See the RestartsI menu item for further choices.    

     Can someone explain to me why this is happening and what I can do
     about it?  (Could I "undefstruct" [1], for example?)

Thanks much!
Cecil Huang