src/swipl-devel/packages/xpce/man/refmanual/md/class.md

class class {#class-class}

Class class describes a PCE class. All classes (including class class itself) are an instance of this class. The classes are organised in a single-inheritance hierarchy. Class object is the root of the PCE class hierarchy. A class can be regarded meta-data describing (among others) the following properties of its instances:

The user may create and modify classes to extend the PCE system. Classes are created just like any other PCE object:

?- new(X, class(person, object)).

Creates a class named person below class object. Initially class person only differs from class object by its name.

@see topic Defining Classes @see topic Class-level Programming @see class method @see tool ClassBrowser @see class variable @see class interceptor @see class code @see class behaviour

Instance variables {#class-class-instvars}

Send methods {#class-class-send}

Get methods {#class-class-get}



Try the rswipl package in your browser

Any scripts or data that you put into this service are public.

rswipl documentation built on June 16, 2026, 5:07 p.m.