Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucsd!nosc!helios.ee.lbl.gov!pasteur!ucbvax!hplabs!hp-ses!hpbbn!hpbbi4!stefan From: stefan@hpbbi4.HP.COM (#Stefan Bachert) Newsgroups: comp.lang.prolog Subject: Re: loops in prolog Message-ID: <470002@hpbbi4.HP.COM> Date: 27 Feb 90 14:01:40 GMT References: <1032@fs1.ee.ubc.ca> Organization: Hewlett-Packard GmbH Lines: 22 Hello, Try loop:- repeat, action_1, (not condition_1;action_2,fail), action_3. You must take care of backtracking. Use a predicate like once_true(X):-call(X),!. once_true(_). for calling action_? . I hope this will help you Stefan Bachert