Next: ref-iou-sfh-cos, Previous: ref-iou-sfh-enc, Up: ref-iou-sfh [Contents][Index]
current_input(Stream) unifies Stream with the current input
stream.
user_input, then
seeing(S) unifies S with user. Otherwise,
if the current input stream was opened by see(F), then
seeing(S) unifies S with F. Otherwise, if
the current input stream was opened by open/[3,4], then
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 sequence
seeing(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)