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 | { 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) | ||
| RelOp | ::= #= | #\= | #< | #=< | #> | #>= |