| Did you know ... | Search Documentation: |
| Predicate pce_open/3 |
pce_open(+Object,
+Mode, -Stream)
Works on any object that implements the *_as_file
methods. Currently those are the subclasses of class source_sink:
<-read_as_file<-size_as_file->truncate_as_file->write_as_file
In addition, the following methods provide partial support:
char_array<-read_as_file,
char_array<-size_as_file and
stream->write_as_file.
The stream handle is discarded with Prolog's close/1 predicate. For example, to write to a view:
pce_open(View, append, Stream), format(Stream, 'Hello World~n', []), close(Stream),
See also text_buffer->format.
Reading from a stream is used by PceEmacs to verify the syntax of an
entered clause.