From Lesta@t-online.de  Thu Oct 21 23:35:54 1999
Received: from mailout03.btx.dtag.de (mailout03.btx.dtag.de [194.25.2.151])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id XAA04832
	for <prolog@swi.psy.uva.nl>; Thu, 21 Oct 1999 23:35:53 +0200 (MET DST)
Received: from fwd11.btx.dtag.de ([194.25.2.171])
	by mailout03.btx.dtag.de with smtp 
	id 11ePsX-0001c4-00; Thu, 21 Oct 1999 23:36:09 +0200
Received: from t-online.de (05121269112-0001(btxid)@[193.159.71.53]) 
	by fwd11.btx.dtag.de with smtp
	id <m11ePsO-000K1oC>; Thu, 21 Oct 1999 23:36:00 +0200
Message-ID: <380F869A.7F68167D@t-online.de>
Date: Thu, 21 Oct 1999 23:33:14 +0200
X-Mailer: Mozilla 4.05 [de]C-DT  (Win95; I)
MIME-Version: 1.0
To: Karol Roslaniec <kros@ippt.gov.pl>, prolog@swi.psy.uva.nl
Subject: Re: How to turn off exceptions?
References: <Pine.LNX.3.96.991021222126.22901A-100000@brama.ippt.gov.pl>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Sender: 05121269112-0001@t-dialin.net
From: Lesta@t-online.de (Uwe Lesta)

arol Roslaniec schrieb:
> 
> Hi,
> 
> I have just started to learn Prolog, and I have one question (suppose very
> trival for you).
> I downloaded two versions of Prolog:
> 1. Amzi! Logic Explorer,
> 2. SWI-Prolog.
> 
> Assume, there is no facts in datebase (it is empty).
> In "Amzi!", when I type
> ?- any_goal(anything).
> it answers simply "no", whereas "SWI-Prolog" answers:
> [WARNING: Undefined predicate: `any_goal/1']
> No
> 
> My question is:
> is it possible to TURN OFF exceptions handling in SWI-Prolog.

IMHO NO only for special exceptioans or a special goal.

> I've read about catch/3, but i do not understand much of it.
> At the begining, i would prefer to turn them off globally.
> Or maybe should i use 'exception/3'? I have no idea (cause i do not know
> Prolog good enough).
> BTW, I know what exceptions are and how they work from Object Oriented
> Languages as: Delphi, C++, Java; but using exceptions in Prolog is too
> difficult for me (at least just now).
> 
> Could you help me?

Yes. Try :

?- dynamic any_goal/1.

Yes
?- any_goal(anything).

No
?-

see olso unknown/2 in the manual.

-- 


Regards

Uwe
Lesta@t-online.de

