current_input(
Stream)
unifies Stream with the current input
stream.
user_input
,
seeing(
S)
unifies S with user
. Otherwise,
if the current input stream was opened by see(
F)
,
seeing(
S)
unifies S with F. Otherwise, if
the current input stream was opened by open/[3,4]
,
seeing(
S)
unifies S with the corresponding stream
object.
seeing/1
can be used to verify that a section of code leaves
the current input stream unchanged as follows:
/* nonvar(FileNameOrStream), */ see(FileNameOrStream), ... seeing(FileNameOrStream)
WARNING: The sequenceseeing(File), ... set_input(File),will signal an error if the current input stream was opened by
see/1
. The only sequences that are guaranteed to succeed areseeing(FileOrStream), ... see(FileOrStream)and
current_input(Stream), ... set_input(Stream)