current_op/3

Synopsis

current_op(+Precedence, +Type, +Name)

current_op(*Precedence, *Type, *Name)

Succeeds when the atom Name is currently an operator of type Type and precedence Precedence.

Arguments


Precedence integer
if instantiated, must be an integer in the range 1 to 1200.
Type one of [xfx, xfy, yfx, fx, xf, yf]
if instantiated.
Name atom
atom or a list of atoms if instantiated.

Description

None of the arguments need be instantiated at the time of the call; that is, this predicate can be used to find the precedence or type of an operator or to backtrack through all operators.

To add or remove an operator, use op/3.

Exceptions


type_error
Name not an atom or Type not an atom or Precedence not an integer
domain_error
Precedence not between 1-1200, or Type not one of listed atoms

See Also

op/3 ref-syn-ops.