Next: mpg-ref-not_less_than, Previous: mpg-ref-not_equal_to, Up: mpg-bpr [Contents][Index]
=</2
ISO+Expr1 =<
+Expr2
Succeeds if the result of evaluating Expr1 is less than or equal to the result of evaluating Expr2.
expr, must be ground
expr, must be ground
Evaluates Expr1 and Expr2 as arithmetic expressions and compares the results.
Arithmetic errors (see ref-ari-exc).
| ?- 42 =< 42. yes
| ?- "b" =< "a". no
Note that the symbol ‘=<’ is used here rather than ‘<=’, which is used in some other languages. One way to remember this is that the inequality symbols in Prolog are the ones that cannot be thought of as looking like arrows. The ‘<’ or ‘>’ always points at the ‘=’.