Logtalk reference manual
Control construct: ::/1

::/1

Description

::Predicate

Send a message to self. Only used in the body of a predicate definition. The argument should match a public or protected predicate of self. It may also match a private predicate if the predicate is within the scope of the object where the method making the call is defined, if imported from a category, if used from inside a category, or when using private inheritance.

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

area(Area) :-
    ::width(Width),
    ::height(Height),
    Area is Width*Height.