Next: mpg-ref-stream_position, Previous: mpg-ref-statistics, Up: mpg-bpr [Contents][Index]
stream_code/2stream_code(-Stream, +CStream)
stream_code(+Stream, -CStream)
Converts between Prolog representation, Stream, and C representation, CStream, of a stream.
stream_object
A valid Prolog stream.
integer
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_errorBoth Stream and CStream unbound.
type_errorStream or CStream is not a stream type or CStream is not an integer type.
existence_errorStream is syntactically valid but does not name an open stream or CStream is of integer type but does not name a pointer to a stream.