next up previous
Next: Arithmetic Up: Built-In Predicates Previous: Representing Text in

Operators

op( +Precedence, +Type, +Name)

  Declare Name to be an operator of type Type with precedence Precedence. Name can also be a list of names, in which case all elements of the list are declared to be identical operators. Precedence is an integer between 0 and 1200. Precedence 0 removes the declaration. Type is one of: xf , yf , xfx , xfy , yfx , yfy , fy or fx . The `f ' indicates the position of the functor, while x and y

indicate the position of the arguments. `y ' should be interpreted as ``on this position a term with precedence lower or equal to the precedence of the functor should occur''. For `x ' the precedence of the argument must be strictly lower. The precedence of a term is 0, unless its principal functor is an operator, in which case the precedence is the precedence of this operator. A term enclosed in brackets ((...) ) has precedence 0.

The predefined operators are shown in table gif. Note that all operators can be redefined by the user.

  
Table: System operators

current_op( ?Precedence, ?Type, ?Name)

  Succeeds when Name is currently defined as an operator of type Type with precedence Precedence. See also op/3.



Passani Luca
Tue Nov 14 08:58:33 MET 1995