change-object [Function]


Purpose

The change-object function changes a CLOS instance from one class to another and revises the indexing on the corresponding concepts.

Syntax

change-object instance class

Arguments

The instance argument is a CLOS instance.

The class argument is a CLOS class, or the name of a CLOS class, which shadows a Loom concept.

Value

The change-object function returns instance.

Examples

(setq ?i (make-object 'Single)) ==> \#<Single \#X20FA286> 
(retrieve ?x (Single ?x)) ==> (\#<Single \#X20FA286>) 
(change-object ?i 'Married) ==> (\#<Married \#X20FA286>) 
(retrieve ?x (Single ?x)) ==> NIL 
(retrieve ?x (Married ?x)) ==> (\#<Married\ \#X20FA286>) 
(change-object ?i (find-class 'Single)) ==> (\#<Single \#X20FA286>) 
(ask (Single ?i)) ==> T

See Also

Last modified: Jun 1 1995