op/3 — The Logtalk Handbook v3.47.0 documentation

# `op/3`

## Description

    op(Precedence, Associativity, Operator)
    op(Precedence, Associativity, [Operator, ...])

Declares operators. Operators declared inside entities have local scope. Global operators can be declared inside a source file by writing the respective directives before the entity opening directives.

## Template and modes

    op(+integer, +associativity, +atom_or_atom_list)

## Examples

    :- op(200, fy, +).
    :- op(200, fy, ?).
    :- op(200, fy, @).
    :- op(200, fy, -).

See also

current_op/3