A 'fail' predicate

From: Arun Hallan (arun_hallan_at_hotmail.com)
Date: 02/21/04


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.