Change a property of a stream. The two properties of a stream that may be changed while a stream is open are:
The predicate set_stream_property/2 is not defined in the ISO Prolog standard.
see also: at_end_of_stream/0 at_end_of_stream/1 close/1 close/2 close_user_streams/0 current_input/1 current_output/1 flush_output/0 flush_output/1 open/3 open/4 prolog I/O set_input/1 set_output/1 set_stream_position/2 stream_property/2
| Example | |
| open('c:\\temp\\file.txt', write, S), set_stream_property(S, number_format(true)). |
this example opens an output stream and then the number_format property is turned on. |
| Exceptions | |
| stream is neither a variable nor a stream term | a domain_error(stream, Stream) exception is thrown, the variable Stream is assigned the incorrect stream term |
| stream_property is not a valid stream property | a domain_error(stream_property, Stream_property) exception is thrown |
| the stream property cannot be changed | a permission_error(modify, stream_property, Arg) exception is thrown, Arg is replaced by the stream property that could not be changed |