Availability:built-in
set_prolog_IO(+In,
+Out, +Error)Prepare the given streams for interactive behaviour normally associated
to the terminal. In becomes the user_input and
current_input of the calling thread. Out becomes
user_output and current_output. If Error
equals
Out an unbuffered stream is associated to the same
destination and linked to user_error. Otherwise Error
is used for
user_error. Output buffering for Out is set to
line and buffering on Error is disabled. See
also prolog/0
and set_stream/2.
The clib package provides the library library(prolog_server),
creating a TCP/IP server for creating an interactive session to Prolog.
- Modified in 8.5.9 (👉ad16e27) set_prolog_IO/3 no longer creates a clone stream if stdout and stderr are the same stream, but creates an error stream that writes to the output (and flushes it). This way we can safely close `user_error`.