Defining a Class

A class is defined using the following call:


(defclass class (supers)
	  (slot-specs)
	  class-options)

An example of a call to defclass is:


(defclass xyvector (vector)
  ((x :initarg :x :initform 0)
   (y :initarg :y :initform 0))
  (:documentation "A simple x-y vector"))

defclass is a macro; it calls the function defclass-expr with its arguments un-evaluated.

Contents    Page-10    Prev    Next    Page+10    Index