Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!gatech!udel!news.sprintlink.net!EU.net!sun4nl!swi.psy.uva.nl!jan
From: jan@swi.psy.uva.nl (Jan Wielemaker)
Subject: Re: A question about "clause"
Message-ID: <CzMKtx.6G2@swi.psy.uva.nl>
Organization: Social Science Informatics
References: <1994Nov21.011551.5381@jarvis.cs.toronto.edu> <LHE.94Nov21091841@yang.sics.se>
Date: Mon, 21 Nov 1994 16:08:20 GMT
Lines: 28

lhe@sics.se (Lars-Henrik Eriksson) writes:

>In article <1994Nov21.011551.5381@jarvis.cs.toronto.edu> goku@csri.toronto.edu (Samuel Yet K Hung) writes:

>   When I asked this query in prolog,

>   ? clause(1>0,X).

>   The result is X = 44.

>   Can anyone tell me why this happened? Also, since my intended program needs
>   X = true, can you tell me how I can achieve this?

>   Thank you for any help in advanced.

>To get any meaningful help, you must tell what particular Prolog
>system (including version and computer platform) you are using.

So true.  I'm pretty sure this is C-prolog, which returns a small integer
for all C-defined predicates.

Donot expect clause(1>0, X) to be returning *anything inparticular*.  
Clause only has a sensible definitions for predicates you defined in
such a way that clause operates on them (on some systems this applies to
all the predicates you define in Prolog; in others this applies only
to not-compiled predicates).

	Regards --- Jan
