Re: SWI-Prolog : current_prolog_flag(unknown, fail) is failing.
- From: Jan Wielemaker <jan@xxxxxxxxxxxxxxxxxxx>
- Date: 30 Aug 2006 07:36:59 GMT
On 2006-08-30, robert.oschler@xxxxxxxxx <robert.oschler@xxxxxxxxx> wrote:
Hello,
I'm trying to set the "unknown" prolog flag to "fail". "fail" is
listed as a valid value in the reference manaul. The call fails. What
am I doing wrong?
It helps a lot if you say what you are doing in the first place.
1 ?- set_prolog_flag(unknown, fail).
Yes
2 ?- call(foobar).
No.
Note:
?- foobar.
ERROR: Undefined procedure: foobar/0
This is the DWIM (Do What I Mean) correction system of the toplevel that
still complains. Whats the point calling something from the toplevel that
doesn't exist?
--- Jan
P.s. Don't change this flag. Its a bit nuisance and it should never
have existed in the first place. In SWI-Prolog in particular as
most of the environment relies on autoloading and you cannot do
that if calling an undefined is not an error. See the dynamic
directive.
If you really have to, for example to test a possible incomplete
program as a logical theory, change the flag in the context of
a module and load the theory into that module.
.
- Follow-Ups:
- References:
- SWI-Prolog : current_prolog_flag(unknown, fail) is failing.
- From: robert . oschler
- SWI-Prolog : current_prolog_flag(unknown, fail) is failing.
- Prev by Date: Re: to insert output in a specific folder
- Next by Date: Re: SWI Prolog Runtime configuration.
- Previous by thread: SWI-Prolog : current_prolog_flag(unknown, fail) is failing.
- Next by thread: Re: SWI-Prolog : current_prolog_flag(unknown, fail) is failing.
- Index(es):
Relevant Pages
|
|