Creation of an instanceinstance of a previously defined class can be done with the makemake procedure. This procedure takes one mandatory parameter which is the class of the instance which must be created and a list of optional arguments. Optional arguments are generally used to initialize some slots of the newly created instance. For instance, the following form
will create a new <complex> object and will bind it to the c Scheme variable.
Accessing the slots of the new complex number can be done with the slot-refslot-ref and the slot-set!slot-set! primitives. Slot-set! primitive permits to set the value of an object slot and slot-ref permits to get its value.
Using the describe generic function is a simple way to see all the slots of an object at one time: this function prints all the slots of an object on the standard output. For instance, the expression
will print the following informations on the standard output: