From jan@swi.swi.psy.uva.nl Fri Dec  7 09:39:31 2001
Received: from gollem.swi.psy.uva.nl (gollem.swi.psy.uva.nl [145.18.152.30])
	by swi.psy.uva.nl (8.10.2+Sun/8.11.2) with ESMTP id fB78dUk04245;
	Fri, 7 Dec 2001 09:39:30 +0100 (MET)
Received: (from jan@localhost)
	by gollem.swi.psy.uva.nl (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id fB78dUh15911;
	Fri, 7 Dec 2001 09:39:30 +0100
Date: Fri, 7 Dec 2001 09:39:30 +0100
Message-Id: <200112070839.fB78dUh15911@gollem.swi.psy.uva.nl>
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Subject: Re: [SWIPL] compare coordinates
To: Sebastian Schneider <ss@alesig.de>, prolog <prolog@swi.swi.psy.uva.nl>
In-Reply-To: Sebastian Schneider's message of Fri, 07 Dec 2001 08:35:57 +0000
Phone: +31 - 20 - 525 6121

> 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

