Next: mpg-ref-stream_position_data, Previous: mpg-ref-stream_code, Up: mpg-bpr [Contents][Index]
stream_position/2
stream_position(+Stream, -Position)
True when Position represents the current position of Stream.
stream_object, must be ground
An open stream.
term
Stream position object representing the current position of Stream.
Byte, character, and line counts and line position determine the
position of the pointer in the stream. Such information is found by
using byte_count/2
, character_count/2
,
line_count/2
and line_position/2
. A stream position
object packages this information as a single Prolog terms. You can
retrieve this information from a stream position object using
stream_position_data/3
. Do not rely on the form of this object
in any other way.
Standard term comparison of two stream position objects for the same
stream will work as one expects. When SP1 and SP2 refer
to positions in the same stream, SP1 @< SP2
if and only if
SP1 is before SP2 in the stream.
Stream errors (see ref-iou-sfh-est).