stream-positionOpen generic function
Finds the current position of a positionable stream.
stream-position positionable-stream => position
An instance of <positionable-stream>.
<position-type>.
io
streams
Returns the current position of positionable-stream for reading or writing.
The value returned can be either an instance of <stream-position> or an integer. When the value is an integer, it is an offset from position zero, and is in terms of the stream's element type. For instance, in a Unicode stream, a position of four means that four Unicode characters have been read.
The following example uses positioning to return the character "w" from a stream over the string "hello world":
let stream = make(<string-stream>,
contents: "hello world");
stream-position(stream) := 6;
read-element(stream);