current_output(
Stream)
unifies Stream with the current output
user_output
,
telling(
S)
unifies S with user
. Otherwise,
if the current output stream was opened by tell(
F)
,
telling(
S)
unifies S with F. Otherwise, if
the current output stream was opened by open/[3,4]
,
telling(
S)
unifies S with the corresponding stream
object.
telling/1
can be used to verify that a section of code leaves
the current output stream unchanged as follows:
/* nonvar(FileNameOrStream), */ tell(FileNameOrStream), ... telling(FileNameOrStream)
WARNING: The sequencetelling(File), ... set_output(File),will signal an error if the current output stream was opened by
tell/1
. The only sequences that are guaranteed to succeed aretelling(FileOrStream), ... tell(FileOrStream)and
current_output(Stream), ... set_output(Stream)