Logtalk reference manual
Predicate directive: multifile/1
Contents > Reference Manual > Directives > multifile/1

## multifile/1

#### Description

    multifile(Functor/Arity)
    multifile((Functor1/Arity1, Functor2/Arity2, ...))
    multifile([Functor1/Arity1, Functor2/Arity2, ...])

    multifile(Entity::Functor/Arity)
    multifile((Entity1::Functor1/Arity1, Entity2::Functor2/Arity2, ...))
    multifile([Entity1::Functor1/Arity1, Entity2::Functor2/Arity2, ...])

    multifile(Functor//Arity)
    multifile((Functor1//Arity1, Functor2//Arity2, ...))
    multifile([Functor1//Arity1, Functor2//Arity2, ...])

    multifile(Entity::Functor//Arity)
    multifile((Entity1::Functor1//Arity1, Entity2::Functor2//Arity2, ...))
    multifile([Entity1::Functor1//Arity1, Entity2::Functor2//Arity2, ...])

Declares multifile predicates and multifile grammar rule non-terminals. The predicate (or non-terminal) must also be declared public in the object (or category) holding its primary declaration (i.e. the declaration without the `Entity::` prefix). Protocols cannot declare multifile predicates as protocols cannot contain predicate definitions.

#### Template and modes

    multifile(+predicate_indicator_term)
    multifile(+non_terminal_indicator_term)

    multifile(+object_identifier::+predicate_indicator_term)
    multifile(+object_identifier::+non_terminal_indicator_term)

    multifile(+category_identifier::+predicate_indicator_term)
    multifile(+category_identifier::+non_terminal_indicator_term)

#### Examples

    :- multifile(table/3).
    :- multifile(user::hook/2).