Next: Operator Declarations, Previous: Syntax of Indexicals, Up: Syntax Summary [Contents][Index]
Please note: that the Prolog arithmetic operators /
and
//
do not mean the same thing.
N | ::= integer | |
LinExpr | ::= N | |
| var | ||
| N * var | ||
| N * N | ||
| - LinExpr | ||
| LinExpr + LinExpr | ||
| LinExpr - LinExpr | ||
| ConstraintBody | { if true then 1 else 0 } | |
Expr | ::= LinExpr | |
| - Expr | ||
| Expr + Expr | ||
| Expr - Expr | ||
| Expr * Expr | ||
| Expr ^ Expr | since release 4.9.0 | |
| Expr /\ Expr | since release 4.9.0 | |
| Expr \/ Expr | since release 4.9.0 | |
| Expr \ Expr | since release 4.9.0 | |
| Expr / Expr | { truncated division } | |
| Expr // Expr | { truncated division } since release 4.3 | |
| Expr div Expr | { floored division } since release 4.3 | |
| Expr rem Expr | { truncated remainder } | |
| Expr mod Expr | { floored remainder } | |
| min(Expr,Expr) | ||
| max(Expr,Expr) | ||
| abs(Expr) | ||
| \(Expr) | since release 4.9.0 | |
| xor(Expr,Expr) | since release 4.9.0 | |
| if_then_else(Expr,Expr,Expr) | since release 4.8.0 | |
RelOp | ::= #= | #\= | #< | #=< | #> | #>= |