sets or returns the current output stream
INCLUDE 'iolib.h' writedevice(file)
writedevice(Handle) (i)
handle(Handle) (i) Handle of file to be set
Sets the current output stream to the destination associated with Handle. Handle has to be obtained or initialised by a call to either openwrite , openmodify , or makewindow , or must be one of the predefined file handles stdout or screen. If handle is unbound, the handle of the current output stream is returned.
writedevice(Old), openwrite(f,"test"), writedevice(f), write("Hello World"),nl, writedevice(Old), closefile(f), file_str("test",X), write(X),nl.
A runtime error occurs if the handle is invalid.
prolog-process, client-server, object
openwrite , openmodify , write ,