Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!prlb2!kulcs!alain From: alain@kulcs.UUCP (Alain Callebaut) Newsgroups: comp.lang.prolog Subject: Re: compare/3 problem Message-ID: <765@kulcs.UUCP> Date: Fri, 24-Apr-87 04:44:36 EDT Article-I.D.: kulcs.765 Posted: Fri Apr 24 04:44:36 1987 Date-Received: Sun, 26-Apr-87 04:50:34 EDT Sender: root@kulcs.UUCP Reply-To: alain@kulcs.UUCP (Alain Callebaut) Distribution: world Organization: Dep. of Computer Science, Katholieke Universiteit Leuven Lines: 23 > become globalized. Try the following program on your favourite > WAM-based Prolog: > > test :- foo(X), bar(X). > foo(X) :- compare(Z,Y,X), compare(Z,Y,X). > bar(_). > > The query "?- test." should preferably succeed. (It didn't on one > of the commercially available, widely popular Prologs we tried :-) > > The obvious fix is to let compare/3 globalize variables. I tried this on my favourite WAM-based Prolog (which is BIM-Prolog). As you prefer, "?- test." did SUCCEED. Perhaps you can also try the following program : test :- write(_x), write(_x) . Now, "?- test." should write twice the same numbered variable. (In BIM-Prolog it does.) So, should write/1 (and many others) also globalizLveritar(,Y,e