A 'fail' predicate
From: Arun Hallan (arun_hallan_at_hotmail.com)
Date: 02/21/04
- Next message: Paul: "Stuck on cut problem"
- Previous message: Cesar Rabak: "Re: [OT] GNU-Prolog: builduing executables in Win32 platform"
- Next in thread: Tom Breton: "Re: A 'fail' predicate"
- Reply: Tom Breton: "Re: A 'fail' predicate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 21 Feb 2004 12:50:07 -0800
I have the following code:
/* If Selection and Direction are off then parse goes through
selection filters */
syntaxcheck(Sentence,Selection,Direction):-
Selection = off,
Direction = off,
parseNone(Sentence).
/* If Selection and Direction are off then parse goes through
selection filters */
syntaxcheck(Sentence,Selection,Direction):-
Selection = on,
Direction = off,
parse(Sentence).
/* If Selection and Direction are off then parse goes through all
filters */
syntaxcheck(Sentence,Selection,Direction):-
Selection = on,
Direction = on,
parseAll(Sentence).
I want a fourth condition, whereby if the other three fail, the fourth
will always be carried out. Ive tried some, but what always happens is
if one of the first three succeeds, afterwards the third predicate is
always carried out.
- Next message: Paul: "Stuck on cut problem"
- Previous message: Cesar Rabak: "Re: [OT] GNU-Prolog: builduing executables in Win32 platform"
- Next in thread: Tom Breton: "Re: A 'fail' predicate"
- Reply: Tom Breton: "Re: A 'fail' predicate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]