[ ECLiPSe Term Comparison built-in.|Group Index| Full Index]

?Term1 @=< ?Term2

Succeeds if term Term1 is before or equal to Term2 in the standard ordering.

?Term1
Prolog term.
?Term2
Prolog term.

Description

Succeeds if term Term1 is before or equal to term Term2 in the standard ordering of prolog terms.

The standard ordering of prolog terms is given for compare/3.

Fail Conditions

Fails if Term1 comes after Term2.

Resatisfiable

No.

Exceptions

Examples


   Success:
   X @=< 1.0.           (gives X = _g68)
   1.0 @=< 0.
   0 @=< "zero".
   same @=< same.
   diffa @=< diffb.
   [a|b] @=< [a,b].
   [a,b|X] @=< [a,b,c]. (gives X = _g90)
   f(100) @=< f(0,0).
   a(100) @=< b(1).
   Fail:
   1.0 @=< X.
   0 @=< 1.0.
   atom @=< "atom".
   a(1,2,3) @=< a(1,2,X).


See Also

@> / 2, @< / 2, @>= / 2