Logtalk reference manual
Control construct: ^^/1

^^/1

Description

^^Predicate

Calls an inherited predicate definition. The call fails if there is no inherited predicate definition. This control construct may be used within objects or categories in the body of a predicate definition. When used within a category, the lookup for the overridden predicate definition is restricted to the extended categories. This control construct is optimized for the case where the inherited predicate being called is the same predicate being redefined.

Template and modes

^^+callable

Errors

Predicate is a variable:
instantiation_error
Predicate is neither a variable nor a callable term:
type_error(callable, Predicate)
Predicate is declared private:
permission_error(access, private_predicate, Predicate)
Predicate is not declared:
existence_error(predicate_declaration, Predicate)

Examples

init :-
    assertz(counter(0)),
    ^^init.