
eval(+Expression, -Result)

   Used to evaluate eval/1 terms in arithmetic expressions.

Arguments
   Expression          An arithmetic expression.
   Result              A variable or a number.

Type
   Arithmetic

Description
   This is one of the predicates used by the ECLiPSe compiler to expand
   arithmetic expressions. If an expression contains a subexpression that
   is not known at compile time, it must be wrapped in eval/1, e.g.

   X is eval(Expr)+1

   This will be compiled into the sequence

   eval(Expr,T1), +(T1,1,X)

   and eval/2 will interpret the expression Expr at runtime.


Modes and Determinism
   eval(+, -) is det

Modules
   This predicate is sensitive to its module context (tool predicate, see @/2).

Exceptions
     4 --- Expression is uninstantiated.
     5 --- Result is neither a number nor a variable.
     5 --- Evaluation of Expression gives a different type than Result.
    21 --- An evaluation predicate in the expression is not defined.
    24 --- Expression is not a valid arithmetic expression.

Examples
   





See Also
   is / 2
