% File: testloop.p % show how to read and loop; and get exit gracefully testloop :- read(X), X \== 'quit', write(X), nl, testloop. testloop.