Navigation  without Java Scripts

Reference to the Object Itself

All non-static member predicates have an invisible (to the programmer) extra parameter that is a pointer (object identifier) to an actual instance (object) of the class.

If it is necessary to refer to the object itself, for instance to access a predicate in an inherited class, it is possible to use the built-in predicate this. Predicate this allows, for instance, to get access to any non-static member predicate or a member fact that is defined in the class or in its base classes.

The syntax for making call to predicate this is:

this(ObjectIdentifier)

Predicate this can be used only inside clauses of non-static member-predicates. Predicate this has the single output argument. It is not allowed to use the single underscore for name of this variable.

See also examples in topics Derived Classes and Inheritance and Class Instances.

See also