Logtalk predicate directive: protected/1

contents > reference manual > directives

## `protected/1`

#### Description

>     protected(Predicate)
>     protected(Predicate1, Predicate2, ...)
>     protected([Predicate1, Predicate2, ...])

> Declares protected predicates. A protected predicate can only be called from the object containing the declaration or from an object that inherits the declaration.

#### Template and modes

>     protected(+predicate_indicator_term)

#### Examples

>     :- protected(init/1).

>     :- protected(print/2, convert/4).

>     :- protected([load/1, save/3]).

previous | glossary | next
Copyright © Paulo Moura — Logtalk.org