Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

:class

:class

type: message selector
location: built-in
source file: xlobj.c
Common LISP compatible: no
supported on: all machines

SYNTAX

(send <object> :class)
        <object>        -       an existing object

DESCRIPTION

The :CLASS message selector will cause a method to run that will return the object which is the class of the specified <object>. Note that the returned value is an object which will look like "#<Object: #18d8c>". The <object> must exist or an error will be generated - "error: bad argument type".

EXAMPLES

(send object :class)                    ; returns the CLASS object
(send class :class)                     ; returns the CLASS object
(setq new-cls (send class :new '(var))) ; create NEW-CLS
(setq new-obj (send new-cls :new))      ; create NEW-OBJ of NEW-CLS
(send new-obj :class)                   ; returns the NEW-CLS object
(send new-cls :class)                   ; returns the CLASS object


Go to the first, previous, next, last section, table of contents.