11.3.113 line_position/2

Synopsis

line_position(+Stream, -Count)

Obtains the total number of characters either input from or output to the current line of the open text stream Stream and unifies it with Count.

Arguments

Stream
stream_object, must be ground

A valid open text stream.

Count
integer

The resulting line count of the stream.

Description

A fresh line has a line position of 0, i.e. this predicate counts the length of the current line. Line count for an interactive stream reflects the total line input from or output to any interactive stream, i.e. all interactive streams share the same counter.

The count is reset by set_stream_position/2.

Exceptions

Stream errors (see ref-iou-sfh-est).

See Also

byte_count/2, character_count/2, line_count/2, stream_position/2, set_stream_position/2, ref-iou-sfh.


Send feedback on this subject.