Say that I have one predicate called test (which just succeds or fails,
returns back yes or no), and I have another predicate called checker,
basically here's what I am trying to do in prolog:

test :- checker(T),  if checker suceeds(i.e, returns yes) then print
bla..bla..bla otherwise
          checker processes the remaining predicates here ........

how can I represent all that in prolog in one single rule of test without
having to declare another test rule for this? Is there anyway I can get
around this?
-- 
View this message in context: 
http://www.nabble.com/if-and-else-in-prolog-in-a-single-rule-tp20228349p20228349.html
Sent from the Gnu - Prolog - Users mailing list archive at Nabble.com.



_______________________________________________
Users-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/users-prolog

Reply via email to