submit_query_and_print_results_(Term, VarList) :-
'$get_b_value'(B),
+ bb_put('$report_all', false),
'$call'(Term),
write_eqs_and_read_input(B, VarList),
!.
).
read_input(ThreadedGoals, NewVarList) :-
- get_single_char(C),
+ ( bb_get('$report_all', true) ->
+ C = n
+ ; get_single_char(C)
+ ),
( C = w ->
nl,
write(' '),
read_input(ThreadedGoals, NewVarList)
; member(C, ['\n', .]) ->
nl, write('; ... .'), nl
+ ; C = a ->
+ bb_put('$report_all', true),
+ nl, write('; '), false
; read_input(ThreadedGoals, NewVarList)
).
nl, nl,
write('SPACE, "n" or ";": next solution, if any\n'),
write('RETURN or ".": stop enumeration\n'),
+ write('"a": enumerate all solutions\n'),
write('"h": display this help message\n'),
write('"w": write terms without depth limit\n'),
write('"p": print terms with depth limit\n\n').