11.3.128 =< /2 [ISO]

Synopsis

+Expr1 =< +Expr2

Succeeds if the result of evaluating Expr1 is less than or equal to the result of evaluating Expr2.

Arguments

Expr1
expr, must be ground
Expr2
expr, must be ground

Description

Evaluates Expr1 and Expr2 as arithmetic expressions and compares the results.

Exceptions

Arithmetic errors (see ref-ari-exc).

Examples

     | ?- 42 =< 42.
     
     yes
     | ?- "b" =< "a".
     
     no

Comments

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 `='.

See Also

ref-ari


Send feedback on this subject.