Next: Different types of equality
Up: No Title
Previous: Rules of Execution of
miles(sketches_of_spain)
miles(a_kind_of_blue)
- If Prolog is asked
miles( X)
it will answer with :
X = sketches_of_spain
- However, we may be interested in obtaining alternate answers
- To obtain another answer, we force Prolog to invoke backtracking
- Prolog continues execution by failing the last goal that was satisfied and by
backtracking as in normal execution - to find another clause whose head matches goal
- Hence :
miles( X)
it will answer with :
X = sketches_of_spain
X = a_kind_of_blue
no
Omer F Rana
Thu Feb 13 19:58:14 GMT 1997