4.7.2 Evaluating Arithmetic Expressions

The most common way to do arithmetic calculations in Prolog is to use the built-in predicate is/2.

-Term is +Expr
Term is the value of arithmetic expression Expr.

Expr must not contain any uninstantiated variables. Do not confuse is/2 with =/2.


Send feedback on this subject.