previous up next     contents index
Next: Instance Variable Access Up: Classes and Objects Previous: Initial Values

Creating Objects

 

  Objects are created with the  make-object procedure:

 
  (make-object class init-param tex2html_wrap_inline6565  ... init-param tex2html_wrap_inline6680 ) 

The values of init-param tex2html_wrap_inline6565 ...init-param tex2html_wrap_inline6680 are passed as initialization arguments.

All instance variables are initially bound to the special value #<undefined>. After values are assigned to the initialization arguments, the initial value expression for each instance variable is evaluated.

Among the instance variable initial value expressions and sequence clause expressions, each superclass's instance variables must be initialized (once) by calling superclass-name-init:

 
   (superclass-name-init super-init-param tex2html_wrap_inline6565  ...super-init-param tex2html_wrap_inline6688 ) 

When using the single-inheritance form class, then the superclass initialization procedure is named  super-init.

Instance variables inherited from a superclass will not be initialized until the superclass's initialization procedure is invoked. It is an error to reach the end of initialization without invoking all of the (non-null) superclasses initialization procedures; the  exn:object:init:never exception is raised in this case. If a superclass initialization procedure is called more than once, the  exn:object:init:multi exception is raised.



PLT