Unlike in Prolog where answers are printed one at a time and a semi-colon is used to get the next answer, in qulog interpreter the first five answers are printed and a .. is used to get the next batch of answers. Notice that the interpreter displays the inferred type next to each answer term.
We can change the number of answers produced at a time as follows using the special interpreter query action set_num_answers
. This, and several queries below, are only for use in the interpreter and is not available for use in rules.
We can set the number of solutions back to the default:
We can constrain the query in a couple of ways as illustrated below. Say we wanted to know the people who have ages over 39 then we could use the query
What if we didn't care about the age and didn't want to clutter the interpreter output with this information then we use either of the following queries.
What if we wanted the answers to this particular query to appear two at a time but didn't want to globally change the number of answers printed. The following query will do.