Subject: Re: [SWIPL] compare coordinates

From: Jan Wielemaker <[email-masked]>
Date: Fri, 7 Dec 2001 09:39:30 +0100

> Hello!
> 
> I have one questions. Is there a possibility to know if there are two
> coordinates NOT the same? i have two values X and Y, and want to know if
> they are not the same. With compare i can only determine if the are the
> =,>,<, right? Can i use NOT in some way?

First, realise there are TWO comparison categories: term-order and
arithmetic (numeric).  Term-order can compare any two terms and is
defined by compare/3, as well as ==, etc.  See section "Standard order
of Terms" in the manual.  Inequality is done using \== (they are not
the same) or \=, which is equivalent to \+(A=B) and means `cannot
unify' (one of Prolog's negation problems ...).

Arithmetic comparison is realised using >, <, etc.  Equivalence is
=:= and non-equavalence is =\= (section "Arithmetic" from the manual).

	--- Jan