previous up next     contents index
Next: Initialization Variables Up: Classes and Objects Previous: An Example

Creating Classes

  Classes are created with the class* form:  

 
   (class* ((superclass-name superclass-expression)  tex2html_wrap_inline8722 ) initialization-variables
      instance-variable-clause
       tex2html_wrap_inline8722 ) 

  The single-inheritance form class is macro:

 
  (class superclass-expression initialization-variables
     instance-variable-clause
      tex2html_wrap_inline8722 )
    tex2html_wrap_inline8824 
   (class* ((super superclass-expression)) initialization-variables
      instance-variable-clause
       tex2html_wrap_inline8722 ) 

The value of each superclass-expression must be a class from which this class is derived. Each superclass-name must be an identifier; within the class definition, this name is used to refer to a specific superclass. Each superclass-name must be distinct. If a superclass-expression evaluates to the empty list, then an empty superclass is used.

The initialization-variables part defines the initialization variables. The instance-variable-declaration-clauses define the class's instance variables.





PLT