StreamPosition
✖
StreamPosition
StreamPosition[stream]
returns an integer that specifies the position of the current point in an open stream.
Details

- On most computer systems, the integer returned by StreamPosition gives the position counting from the beginning of the file in bytes.
Examples
Basic Examples (1)Summary of the most common use cases
In[1]:=1

✖
https://wolfram.com/xid/0b8b4t42qa-v5ykn9
Out[1]=1

Read the first number from the stream object:
In[2]:=2

✖
https://wolfram.com/xid/0b8b4t42qa-0mouva
Out[2]=2

The position counting from the beginning of the stream:
In[3]:=3

✖
https://wolfram.com/xid/0b8b4t42qa-h9tcck
Out[3]=3

In[4]:=4

✖
https://wolfram.com/xid/0b8b4t42qa-xqogeq
Out[4]=4

Wolfram Research (1991), StreamPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPosition.html.
✖
Wolfram Research (1991), StreamPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPosition.html.
Text
Wolfram Research (1991), StreamPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPosition.html.
✖
Wolfram Research (1991), StreamPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPosition.html.
CMS
Wolfram Language. 1991. "StreamPosition." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/StreamPosition.html.
✖
Wolfram Language. 1991. "StreamPosition." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/StreamPosition.html.
APA
Wolfram Language. (1991). StreamPosition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StreamPosition.html
✖
Wolfram Language. (1991). StreamPosition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StreamPosition.html
BibTeX
✖
@misc{reference.wolfram_2025_streamposition, author="Wolfram Research", title="{StreamPosition}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/StreamPosition.html}", note=[Accessed: 19-June-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2025_streamposition, organization={Wolfram Research}, title={StreamPosition}, year={1991}, url={https://reference.wolfram.com/language/ref/StreamPosition.html}, note=[Accessed: 19-June-2025
]}