line_count/2

Synopsis

line_count(+Stream, -N)

Unifies N with the total number of lines either read or written on the open stream Stream.

Arguments


Stream stream_object

N integer

Description

A freshly opened stream has a line count of 1. See ref-iou-sos-spt, for details on the use of this predicate on a stream that is directed to the user's terminal.

Exception

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

See Also

character_count/2, line_position/2, stream_position/3 ref-iou