stream_code/2
stream_code(
-Stream,
+CStream)
stream_code(
+Stream,
-CStream)
Converts between Prolog representation, Stream, and C representation, CStream, of a stream.
A valid Prolog stream.
Representing an SP_stream *
pointer.
At least one argument must be ground.
stream_code/2
is used when there are input/output related operations
performed on the same stream in both Prolog code and foreign code.
The CStream value can be used as the stream argument to
any of the SP_* functions taking a stream argument.
instantiation_error
type_error
existence_error