see/1
see(
+FileOrStream)
Makes file FileOrStream the current input stream.
If there is an open input stream associated with FileOrStream, and that
stream was opened by see/1
, then it is made the current input stream.
Otherwise, the specified file is opened for input in text mode with default options and
made the current input stream.
Different file names (that is, names that do not unify) represent different streams (even if they correspond to the same file). Therefore, assuming food and ./food represent the same file, the following sequence will open two streams, both connected to the same file.
see(food) ... see('./food')
It is important to remember to close streams when you have finished with
them. Use seen/0
or close/[1,2]
.
instantiation_error
existence_error
fileerrors
Prolog flag is on
.
permission_error
domain_error
seen/0
, open/[3,4]
, current_input/1
, ref-iou-sfh,
ref-lps-flg.