Merge pull request #639 from triska/flush_output

ENHANCED: flush output for impure I/O (format/[2,3], portray_clause/1 etc.)
This commit is contained in:
Mark Thom
2020-07-25 13:20:45 -03:00
committed by GitHub

View File

@@ -377,7 +377,8 @@ format(Stream, Fs, Args) :-
% we use a specialised internal predicate that uses only a
% single "write" operation for efficiency. It is equivalent to
% maplist(put_char(Stream), Cs). It also works for binary streams.
'$put_chars'(Stream, Cs).
'$put_chars'(Stream, Cs),
flush_output(Stream).
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
?- phrase(cells("hello", [], 0, []), Cs).