Noeud: DEC-10 Prolog File IO, Noeud « Previous »: Socket IO, Noeud « Up »: Input / Output



DEC-10 Prolog File IO

The DEC-10 prolog IO predicates are available with the library dec10:

see(+File)
File File becomes the current input stream. File may be a stream previously opened by see/1 or a filename. If it is a filename, the following action is taken: If there is a stream opened by see/1 associated with the same file already, then it becomes the current input stream. Otherwise, the file File is opened for input and made the current input stream.
seeing(?FileName)
FileName is unified with the name of the current input file, if it was opened by see/1, with the current input stream, if it is not user_input, otherwise with user.
seen
Closes the current input stream, and resets it to user_input.
tell(+File)
File File becomes the current output stream. File may be a stream previously opened by tell/1 or a filename. If it is a filename, the following action is taken: If there is a stream opened by tell/1 associated with the same file already, then it becomes the current output stream. Otherwise, the file File is opened for output and made the current output stream.
telling(?FileName)
FileName is unified with the name of the current output file, if it was opened by tell/1, with the current output stream, if it is not user_output, otherwise with user.
told
Closes the current output stream, and resets it to user_output.