| retrieve information to the defined operators.
current_op(-Priority, -Type, -Operator)
By backtracing Operator gets unified with the name of the operator,
Type gets unified with its type and Priority gets unified
with its priority.
Predefined operators are:
| 1200, | fx, |
(?-), (:-) |
| 1200, |
xfx, |
(:-), (:--), (-->) |
| 1100, |
fx, |
(dynamic) |
| 1100, |
xfy, |
(;) |
| 1050, |
xfy, |
(->) |
| 1000, |
xfy, |
(',') |
| 900, |
fy, |
(not), (\+) |
| 700, |
xfx, |
(=), (\=) |
| 700, |
xfx, |
(==), (\==), (@<), (@=<), (@>), (@>=) |
| 700, |
xfx, |
(=..) |
| 700, |
xfx, |
(is), (=:=), (=\=), (<), (=<), (>), (>=) |
| 500, |
yfx, |
(+), (-), (\/), (/\) |
| 400, |
yfx, |
(//), (/), (*), (mod), (rem), (<<), (>>) |
| 200, |
xfx, |
(**) |
| 200, |
xfy, |
(^) |
| 200, |
fy, |
(\), (-) |
| 100, |
xfx, |
(:) |
| Specifier | Class | Associativity
|
|---|
| fx | prefix | non-associative
| | fy | prefix | right-associative
| | xfx | infix | non-associative
| | xfy | infix | right-associative
| | yfx | infix | left-associative
| | xf | postfix | non-associative
| | yf | postfix | left-associative
|
Arguments
Priority integer between 1 and 1200.
Type atom (xf | yf | fx | fy | xfx | xfy | yfx)
Operator atom
Examples
| current_op(X,fy,Y). |
Succeeds 4 times (900, fy, not), (900, fy, \+), (200, fy, \), (200,
fy,-). |
Standard
This predicate is part of the ISO-Prolog Standard.
See also
op/3,
print/1/2,
println/1/2,
read/1/2,
read_term/2/3,
write/1/2,
write_canonical/1/2,
write_term/2/3,
writeq/2.
|